From 885fb4aabee301ba02b415baeebf5fb3daa9a485 Mon Sep 17 00:00:00 2001 From: Fabian Dill Date: Wed, 3 Apr 2024 19:49:39 +0200 Subject: [PATCH 001/153] LttP: fix fix fake world always applying --- worlds/alttp/__init__.py | 47 ++++++++++++++++++++-------------------- 1 file changed, 24 insertions(+), 23 deletions(-) diff --git a/worlds/alttp/__init__.py b/worlds/alttp/__init__.py index a3b1dfa65880..8baeeb6dc278 100644 --- a/worlds/alttp/__init__.py +++ b/worlds/alttp/__init__.py @@ -345,42 +345,43 @@ def generate_early(self): def create_regions(self): player = self.player - world = self.multiworld + multiworld = self.multiworld - if world.mode[player] != 'inverted': - create_regions(world, player) + if multiworld.mode[player] != 'inverted': + create_regions(multiworld, player) else: - create_inverted_regions(world, player) - create_shops(world, player) + create_inverted_regions(multiworld, player) + create_shops(multiworld, player) self.create_dungeons() - if world.glitches_required[player] not in ["no_glitches", "minor_glitches"] and world.entrance_shuffle[player] in \ - {"vanilla", "dungeons_simple", "dungeons_full", "simple", "restricted", "full"}: - world.fix_fake_world[player] = False + if (multiworld.glitches_required[player] not in ["no_glitches", "minor_glitches"] and + multiworld.entrance_shuffle[player] in [ + "vanilla", "dungeons_simple", "dungeons_full", "simple", "restricted", "full"]): + multiworld.fix_fake_world[player] = False # seeded entrance shuffle - old_random = world.random - world.random = random.Random(self.er_seed) + old_random = multiworld.random + multiworld.random = random.Random(self.er_seed) - if world.mode[player] != 'inverted': - link_entrances(world, player) - mark_light_world_regions(world, player) + 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(): - world.register_indirect_condition(world.get_region(region_name, player), - world.get_entrance(entrance_name, player)) + multiworld.register_indirect_condition(multiworld.get_region(region_name, player), + multiworld.get_entrance(entrance_name, player)) else: - link_inverted_entrances(world, player) - mark_dark_world_regions(world, player) + link_inverted_entrances(multiworld, player) + mark_dark_world_regions(multiworld, player) for region_name, entrance_name in indirect_connections_inverted.items(): - world.register_indirect_condition(world.get_region(region_name, player), - world.get_entrance(entrance_name, player)) + multiworld.register_indirect_condition(multiworld.get_region(region_name, player), + multiworld.get_entrance(entrance_name, player)) - world.random = old_random - plando_connect(world, player) + multiworld.random = old_random + plando_connect(multiworld, player) for region_name, entrance_name in indirect_connections.items(): - world.register_indirect_condition(world.get_region(region_name, player), - world.get_entrance(entrance_name, player)) + 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 From 8d9bd0135eb254ffd51254031c9058734e10a565 Mon Sep 17 00:00:00 2001 From: Alchav <59858495+Alchav@users.noreply.github.com> Date: Sat, 6 Apr 2024 12:53:20 -0500 Subject: [PATCH 002/153] LTTP: Fix Bug With Custom Resource Spending (#3105) --- data/basepatch.bsdiff4 | Bin 114116 -> 114119 bytes worlds/alttp/Rom.py | 2 +- 2 files changed, 1 insertion(+), 1 deletion(-) diff --git a/data/basepatch.bsdiff4 b/data/basepatch.bsdiff4 index aa8f1375c522b724ae1944ebb6de113a7e592a35..379eee80c6c083b1f933fb2a4c346d28cb16f711 100644 GIT binary patch delta 109064 zcmZ5{19T=$*XjWK`%75gYdlrOCF?LD)lnSw$rRPWC;{mZ zvMIF563P-Z9QkDSWwZscB_A7Rb~(b-$#WkGc>&=^sH$^T_B%?6Km>UhMN#YWlqsJa zRr$hYG4Ty+$<%-p>u8e%2tw6S{_=e3W5R6ts&jivi6va01Sz058L5}PskE~VN_%`N{M(yc$})Ys&&=bIaPU4TT-Eo z75l@Km#U4oqS8)z`Le3yUsWo?a1bE#BX=rskd#9oaS?DTt;`^W7a+sKvk5CI?Ip5t ztq^b!u!%>aFo0Z%32OF=G!;dh*75>!E7s>e;VXCfDT?R<@~LKoQZtFmql6{IKKbSO zDONUMC?&+4)Q`B3B4>n!W>!{(=gktDfE8e+B#kon0UuY(k9Q7|ob2*#qzweD7g+8n^wC^FBZq$?Qf<0`b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K>wvZ41 zdslbKRHz8PQTDW9e(Igm7ZPMA*mN3(#@BAnWt6Q@%^cNY0pr>#=|8yXT19`-kds2y ztySm52$g_9k4&L}XW+SyVCoexQ&uWIT4A+=mV!er^ctF2vge-HdH2Vmr866Zjwx!U z&E+SiGu*xHA%vl~9K;c8{d_Gv`72z>eusUBtIp*wtHuULE_HI{Qp77{XNF?718( Date: Sun, 7 Apr 2024 00:17:48 +0100 Subject: [PATCH 003/153] fixing minor typos on options (#3080) --- worlds/smz3/Options.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/worlds/smz3/Options.py b/worlds/smz3/Options.py index e3d8b8dd10e2..ada463fa3629 100644 --- a/worlds/smz3/Options.py +++ b/worlds/smz3/Options.py @@ -25,7 +25,7 @@ class SwordLocation(Choice): Randomized - The sword can be placed anywhere. Early - The sword will be placed in a location accessible from the start of the game. - Unce assured - The sword will always be placed on Link's Uncle.""" + Uncle - The sword will always be placed on Link's Uncle.""" display_name = "Sword Location" option_Randomized = 0 option_Early = 1 @@ -48,7 +48,7 @@ class MorphLocation(Choice): class Goal(Choice): """This option decides what goal is required to finish the randomizer. - Defeat Ganon and Mother Brain - Find the required crystals and boss tokens kill both bosses. + Defeat Ganon and Mother Brain - Find the required crystals and boss tokens to kill both bosses. Fast Ganon and Defeat Mother Brain - The hole to ganon is open without having to defeat Agahnim in Ganon's Tower and Ganon can be defeat as soon you have the required crystals to make Ganon vulnerable. For keysanity, this mode also removes From 569c37cb8ed14fcd47fcfcfc2f077df1cb168bb0 Mon Sep 17 00:00:00 2001 From: Nicholas Saylor <79181893+nicholassaylor@users.noreply.github.com> Date: Sat, 6 Apr 2024 19:25:26 -0400 Subject: [PATCH 004/153] Core, Webhost, Docs: Replace all usages of player settings (#3067) * Replace all usages of player settings * Fixed line break error * Attempt to fix line break again * Finally figure out what Pycharm did to this file * Pycharm search failed me * Remove duplicate s * Update ArchipIdle * Revert random newline changes from Pycharm * Remove player settings from fstrings and rename --samesettings to --sameoptions * Finally get PyCharm to not auto-format my commits, randomly inserting the newlines * Removing player-settings * Missed one * Remove final line break error Co-authored-by: Exempt-Medic <60412657+exempt-medic@users.noreply.github.com> --------- Co-authored-by: Exempt-Medic <60412657+Exempt-Medic@users.noreply.github.com> Co-authored-by: Exempt-Medic --- Generate.py | 10 ++++---- WebHostLib/misc.py | 6 ----- docs/settings api.md | 2 +- settings.py | 2 +- worlds/adventure/docs/setup_en.md | 2 +- worlds/adventure/docs/setup_fr.md | 4 +-- worlds/alttp/docs/multiworld_de.md | 4 +-- worlds/alttp/docs/multiworld_es.md | 4 +-- worlds/alttp/docs/multiworld_fr.md | 6 ++--- worlds/archipidle/docs/guide_en.md | 2 +- worlds/archipidle/docs/guide_fr.md | 7 +++--- worlds/dark_souls_3/docs/setup_fr.md | 2 +- worlds/dlcquest/docs/fr_DLCQuest.md | 4 +-- worlds/dlcquest/docs/setup_fr.md | 4 +-- worlds/generic/docs/advanced_settings_en.md | 25 ++++++++++--------- worlds/generic/docs/triggers_en.md | 4 +-- worlds/minecraft/docs/minecraft_fr.md | 4 +-- worlds/minecraft/docs/minecraft_sv.md | 2 -- worlds/musedash/docs/setup_es.md | 4 +-- worlds/oot/docs/setup_fr.md | 4 +-- worlds/pokemon_rb/docs/setup_es.md | 2 +- worlds/timespinner/docs/setup_de.md | 2 +- worlds/witness/docs/setup_en.md | 2 +- worlds/yoshisisland/docs/en_Yoshi's Island.md | 2 +- worlds/yoshisisland/docs/setup_en.md | 2 +- 25 files changed, 52 insertions(+), 60 deletions(-) diff --git a/Generate.py b/Generate.py index f646e994dcac..91fe72221dce 100644 --- a/Generate.py +++ b/Generate.py @@ -35,8 +35,8 @@ def mystery_argparse(): parser = argparse.ArgumentParser(description="CMD Generation Interface, defaults come from host.yaml.") parser.add_argument('--weights_file_path', default=defaults.weights_file_path, - help='Path to the weights file to use for rolling game settings, urls are also valid') - parser.add_argument('--samesettings', help='Rolls settings per weights file rather than per player', + help='Path to the weights file to use for rolling game options, urls are also valid') + parser.add_argument('--sameoptions', help='Rolls options per weights file rather than per player', action='store_true') parser.add_argument('--player_files_path', default=defaults.player_files_path, help="Input directory for player files.") @@ -104,8 +104,8 @@ def main(args=None, callback=ERmain): del(meta_weights["meta_description"]) except Exception as e: raise ValueError("No meta description found for meta.yaml. Unable to verify.") from e - if args.samesettings: - raise Exception("Cannot mix --samesettings with --meta") + if args.sameoptions: + raise Exception("Cannot mix --sameoptions with --meta") else: meta_weights = None player_id = 1 @@ -157,7 +157,7 @@ def main(args=None, callback=ERmain): erargs.skip_output = args.skip_output settings_cache: Dict[str, Tuple[argparse.Namespace, ...]] = \ - {fname: (tuple(roll_settings(yaml, args.plando) for yaml in yamls) if args.samesettings else None) + {fname: (tuple(roll_settings(yaml, args.plando) for yaml in yamls) if args.sameoptions else None) for fname, yamls in weights_cache.items()} if meta_weights: diff --git a/WebHostLib/misc.py b/WebHostLib/misc.py index ee04e56fd768..ec461e7d47bd 100644 --- a/WebHostLib/misc.py +++ b/WebHostLib/misc.py @@ -49,12 +49,6 @@ def weighted_options(): return render_template("weighted-options.html") -# TODO for back compat. remove around 0.4.5 -@app.route("/games//player-settings") -def player_settings(game: str): - return redirect(url_for("player_options", game=game), 301) - - # Player options pages @app.route("/games//player-options") @cache.cached() diff --git a/docs/settings api.md b/docs/settings api.md index 41023879adf8..bfc642d4b50c 100644 --- a/docs/settings api.md +++ b/docs/settings api.md @@ -1,7 +1,7 @@ # Archipelago Settings API The settings API describes how to use installation-wide config and let the user configure them, like paths, etc. using -host.yaml. For the player settings / player yamls see [options api.md](options api.md). +host.yaml. For the player options / player yamls see [options api.md](options api.md). The settings API replaces `Utils.get_options()` and `Utils.get_default_options()` as well as the predefined `host.yaml` in the repository. diff --git a/settings.py b/settings.py index c58eadf155d7..390920433c03 100644 --- a/settings.py +++ b/settings.py @@ -1,6 +1,6 @@ """ Application settings / host.yaml interface using type hints. -This is different from player settings. +This is different from player options. """ import os.path diff --git a/worlds/adventure/docs/setup_en.md b/worlds/adventure/docs/setup_en.md index 94a735bb74f4..060225e3971a 100644 --- a/worlds/adventure/docs/setup_en.md +++ b/worlds/adventure/docs/setup_en.md @@ -43,7 +43,7 @@ an experience customized for their taste, and different players in the same mult You can generate a yaml or download a template by visiting the [Adventure Options Page](/games/Adventure/player-options) -### What are recommended settings to tweak for beginners to the rando? +### What are recommended options to tweak for beginners to the rando? Setting difficulty_switch_a and lowering the dragons' speeds makes the dragons easier to avoid. Adding Chalice to local_items guarantees you'll visit at least one of the interesting castles, as it can only be placed in a castle or the credits room. diff --git a/worlds/adventure/docs/setup_fr.md b/worlds/adventure/docs/setup_fr.md index 07881ce94da4..e8346fe6f088 100644 --- a/worlds/adventure/docs/setup_fr.md +++ b/worlds/adventure/docs/setup_fr.md @@ -42,7 +42,7 @@ une expérience personnalisée à leur goût, et différents joueurs dans le mê ### Où puis-je obtenir un fichier YAML ? -Vous pouvez générer un yaml ou télécharger un modèle en visitant la [page des paramètres d'aventure](/games/Adventure/player-settings) +Vous pouvez générer un yaml ou télécharger un modèle en visitant la [page des paramètres d'aventure](/games/Adventure/player-options) ### Quels sont les paramètres recommandés pour s'initier à la rando ? Régler la difficulty_switch_a et réduire la vitesse des dragons rend les dragons plus faciles à éviter. Ajouter Calice à @@ -72,4 +72,4 @@ configuré pour le faire automatiquement. Pour connecter le client au multiserveur, mettez simplement `:` dans le champ de texte en haut et appuyez sur Entrée (si le le serveur utilise un mot de passe, saisissez dans le champ de texte inférieur `/connect  : [mot de passe]`) -Appuyez sur Réinitialiser et commencez à jouer \ No newline at end of file +Appuyez sur Réinitialiser et commencez à jouer diff --git a/worlds/alttp/docs/multiworld_de.md b/worlds/alttp/docs/multiworld_de.md index 8ccd1a87a6b7..c8c802d75040 100644 --- a/worlds/alttp/docs/multiworld_de.md +++ b/worlds/alttp/docs/multiworld_de.md @@ -47,12 +47,12 @@ wählen können! ### Wo bekomme ich so eine YAML-Datei her? -Die [Player Settings](/games/A Link to the Past/player-settings) Seite auf der Website ermöglicht das einfache Erstellen +Die [Player Options](/games/A Link to the Past/player-options) Seite auf der Website ermöglicht das einfache Erstellen und Herunterladen deiner eigenen `yaml` Datei. Drei verschiedene Voreinstellungen können dort gespeichert werden. ### Deine YAML-Datei ist gewichtet! -Die **Player Settings** Seite hat eine Menge Optionen, die man per Schieber einstellen kann. Das ermöglicht es, +Die **Player Options** Seite hat eine Menge Optionen, die man per Schieber einstellen kann. Das ermöglicht es, verschiedene Optionen mit unterschiedlichen Wahrscheinlichkeiten in einer Kategorie ausgewürfelt zu werden Als Beispiel kann man sich die Option "Map Shuffle" als einen Eimer mit Zetteln zur Abstimmung Vorstellen. So kann man diff --git a/worlds/alttp/docs/multiworld_es.md b/worlds/alttp/docs/multiworld_es.md index 37aeda2a63e5..0c907b1f7aa0 100644 --- a/worlds/alttp/docs/multiworld_es.md +++ b/worlds/alttp/docs/multiworld_es.md @@ -59,7 +59,7 @@ de multiworld puede tener diferentes opciones. ### Donde puedo obtener un fichero YAML? -La página "[Generate Game](/games/A%20Link%20to%20the%20Past/player-settings)" en el sitio web te permite configurar tu +La página "[Generate Game](/games/A%20Link%20to%20the%20Past/player-options)" en el sitio web te permite configurar tu configuración personal y descargar un fichero "YAML". ### Configuración YAML avanzada @@ -86,7 +86,7 @@ Si quieres validar que tu fichero YAML para asegurarte que funciona correctament ## Generar una partida para un jugador -1. Navega a [la pagina Generate game](/games/A%20Link%20to%20the%20Past/player-settings), configura tus opciones, haz +1. Navega a [la pagina Generate game](/games/A%20Link%20to%20the%20Past/player-options), configura tus opciones, haz click en el boton "Generate game". 2. Se te redigirá a una pagina "Seed Info", donde puedes descargar tu archivo de parche. 3. Haz doble click en tu fichero de parche, y el emulador debería ejecutar tu juego automáticamente. Como el Cliente no diff --git a/worlds/alttp/docs/multiworld_fr.md b/worlds/alttp/docs/multiworld_fr.md index 078a270f08b9..f2d55787f72c 100644 --- a/worlds/alttp/docs/multiworld_fr.md +++ b/worlds/alttp/docs/multiworld_fr.md @@ -60,7 +60,7 @@ 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-settings) vous permet de configurer vos +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 @@ -87,7 +87,7 @@ Si vous voulez valider votre fichier YAML pour être sûr qu'il fonctionne, vous ## 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-settings), configurez vos options, +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 @@ -207,4 +207,4 @@ Le logiciel recommandé pour l'auto-tracking actuellement est 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 \ No newline at end of file +6. Fermez la fenêtre "AutoTracker" maintenant, elle n'est plus nécessaire diff --git a/worlds/archipidle/docs/guide_en.md b/worlds/archipidle/docs/guide_en.md index f9d7f08aab83..c450ec421dfc 100644 --- a/worlds/archipidle/docs/guide_en.md +++ b/worlds/archipidle/docs/guide_en.md @@ -8,5 +8,5 @@ [ArchipIDLE GitHub Releases Page](https://github.com/ArchipelagoMW/archipidle/releases) 3. Enter the server address in the `Server Address` field and press enter 4. Enter your slot name when prompted. This should be the same as the `name` you entered on the - setting page above, or the `name` field in your yaml file. + options page above, or the `name` field in your yaml file. 5. Click the "Begin!" button. diff --git a/worlds/archipidle/docs/guide_fr.md b/worlds/archipidle/docs/guide_fr.md index c3842ed7db6e..dc0c8af3218c 100644 --- a/worlds/archipidle/docs/guide_fr.md +++ b/worlds/archipidle/docs/guide_fr.md @@ -1,11 +1,10 @@ # Guide de configuration d'ArchipIdle ## Rejoindre une partie MultiWorld -1. Générez un fichier `.yaml` à partir de la [page des paramètres du lecteur ArchipIDLE](/games/ArchipIDLE/player-settings) +1. Générez un fichier `.yaml` à partir de la [page des paramètres du lecteur ArchipIDLE](/games/ArchipIDLE/player-options) 2. Ouvrez le client ArchipIDLE dans votre navigateur Web en : - - Accédez au [Client ArchipIDLE](http://idle.multiworld.link) - - Téléchargez le client et exécutez-le localement à partir du - [Page des versions d'ArchipIDLE GitHub](https://github.com/ArchipelagoMW/archipidle/releases) + - Accédez au [Client ArchipIDLE](http://idle.multiworld.link) + - Téléchargez le client et exécutez-le localement à partir du [Page des versions d'ArchipIDLE GitHub](https://github.com/ArchipelagoMW/archipidle/releases) 3. Entrez l'adresse du serveur dans le champ `Server Address` et appuyez sur Entrée 4. Entrez votre nom d'emplacement lorsque vous y êtes invité. Il doit être le même que le `name` que vous avez saisi sur le page de configuration ci-dessus, ou le champ `name` dans votre fichier yaml. diff --git a/worlds/dark_souls_3/docs/setup_fr.md b/worlds/dark_souls_3/docs/setup_fr.md index 769d331bb98d..ea4d8f818604 100644 --- a/worlds/dark_souls_3/docs/setup_fr.md +++ b/worlds/dark_souls_3/docs/setup_fr.md @@ -29,5 +29,5 @@ placez-le à la racine du jeu (ex: "SteamLibrary\steamapps\common\DARK SOULS III ## Où trouver le fichier de configuration ? -La [Page de configuration](/games/Dark%20Souls%20III/player-settings) sur le site vous permez de configurer vos +La [Page de configuration](/games/Dark%20Souls%20III/player-options) sur le site vous permez de configurer vos paramètres et de les exporter sous la forme d'un fichier. diff --git a/worlds/dlcquest/docs/fr_DLCQuest.md b/worlds/dlcquest/docs/fr_DLCQuest.md index 95a8048dfe5e..25f2d728160e 100644 --- a/worlds/dlcquest/docs/fr_DLCQuest.md +++ b/worlds/dlcquest/docs/fr_DLCQuest.md @@ -2,7 +2,7 @@ ## Où se trouve la page des paramètres ? -La [page des paramètres du joueur pour ce jeu](../player-settings) contient tous les paramètres dont vous avez besoin pour configurer et exporter le fichier. +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 ? @@ -46,4 +46,4 @@ Il y a aussi de nouveaux objets pièges, utilisés comme substituts, basés sur Chaque fois qu'un objet est reçu en ligne, une notification apparaît à l'écran pour en informer le joueur. Certains objets sont accompagnés d'une animation ou d'une scène qui se déroule immédiatement après leur réception. -Les objets reçus hors ligne ne sont pas accompagnés d'une animation ou d'une scène, et sont simplement activés lors de la connexion. \ No newline at end of file +Les objets reçus hors ligne ne sont pas accompagnés d'une animation ou d'une scène, et sont simplement activés lors de la connexion. diff --git a/worlds/dlcquest/docs/setup_fr.md b/worlds/dlcquest/docs/setup_fr.md index 78c69eb5a729..e4b431215d47 100644 --- a/worlds/dlcquest/docs/setup_fr.md +++ b/worlds/dlcquest/docs/setup_fr.md @@ -18,7 +18,7 @@ Voir le guide d'Archipelago sur la mise en place d'un YAML de base : [Basic Mult ### Où puis-je obtenir un fichier YAML ? -Vous pouvez personnaliser vos paramètres en visitant la [page des paramètres du joueur DLC Quest] (/games/DLCQuest/player-settings). +Vous pouvez personnaliser vos paramètres en visitant la [page des paramètres du joueur DLC Quest](/games/DLCQuest/player-options). ## Rejoindre une partie multi-monde @@ -52,4 +52,4 @@ Vous pouvez personnaliser vos paramètres en visitant la [page des paramètres d Vous ne pouvez pas envoyer de commandes au serveur ou discuter avec les autres joueurs depuis DLC Quest, car le jeu ne dispose pas d'un moyen approprié pour saisir du texte. Vous pouvez suivre l'activité du serveur dans votre console BepInEx, car les messages de chat d'Archipelago y seront affichés. -Vous devrez utiliser [Archipelago Text Client] (https://github.com/ArchipelagoMW/Archipelago/releases) si vous voulez envoyer des commandes. \ No newline at end of file +Vous devrez utiliser [Archipelago Text Client] (https://github.com/ArchipelagoMW/Archipelago/releases) si vous voulez envoyer des commandes. diff --git a/worlds/generic/docs/advanced_settings_en.md b/worlds/generic/docs/advanced_settings_en.md index 6d5e20462f13..8e1b1cdb46c6 100644 --- a/worlds/generic/docs/advanced_settings_en.md +++ b/worlds/generic/docs/advanced_settings_en.md @@ -2,27 +2,28 @@ This guide covers more the more advanced options available in YAML files. This guide is intended for the user who plans to edit their YAML file manually. This guide should take about 10 minutes to read. -If you would like to generate a basic, fully playable YAML without editing a file, then visit the settings page for the +If you would like to generate a basic, fully playable YAML without editing a file, then visit the options page for the game you intend to play. The weighted settings page can also handle most of the advanced settings discussed here. -The settings page can be found on the supported games page, just click the "Settings Page" link under the name of the -game you would like. +The options page can be found on the supported games page, just click the "Options Page" link under the name of the +game you would like. + * Supported games page: [Archipelago Games List](/games) * Weighted settings page: [Archipelago Weighted Settings](/weighted-settings) -Clicking on the "Export Settings" button at the bottom-left will provide you with a pre-filled YAML with your options. -The player settings page also has a link to download a full template file for that game which will have every option +Clicking on the "Export Options" button at the bottom-left will provide you with a pre-filled YAML with your options. +The player options page also has a link to download a full template file for that game which will have every option possible for the game including some that don't display correctly on the site. ## YAML Overview The Archipelago system generates games using player configuration files as input. These are going to be YAML files and -each world will have one of these containing their custom settings for the game that world will play. +each world will have one of these containing their custom options for the game that world will play. ## YAML Formatting YAML files are a format of human-readable config files. The basic syntax of a yaml file will have a `root` node and then -different levels of `nested` nodes that the generator reads in order to determine your settings. +different levels of `nested` nodes that the generator reads in order to determine your options. To nest text, the correct syntax is to indent **two spaces over** from its root option. A YAML file can be edited with whatever text editor you choose to use though I personally recommend that you use Sublime Text. Sublime text @@ -53,13 +54,13 @@ so `option_one_setting_one` is guaranteed to occur. For `nested_option_two`, `option_two_setting_one` will be rolled 14 times and `option_two_setting_two` will be rolled 43 times against each other. This means `option_two_setting_two` will be more likely to occur, but it isn't guaranteed, -adding more randomness and "mystery" to your settings. Every configurable setting supports weights. +adding more randomness and "mystery" to your options. Every configurable setting supports weights. ## Root Options Currently, there are only a few options that are root options. Everything else should be nested within one of these root options or in some cases nested within other nested options. The only options that should exist in root -are `description`, `name`, `game`, `requires`, and the name of the games you want settings for. +are `description`, `name`, `game`, `requires`, and the name of the games you want options for. * `description` is ignored by the generator and is simply a good way for you to organize if you have multiple files using this to detail the intention of the file. @@ -79,15 +80,15 @@ are `description`, `name`, `game`, `requires`, and the name of the games you wan * `requires` details different requirements from the generator for the YAML to work as you expect it to. Generally this is good for detailing the version of Archipelago this YAML was prepared for as, if it is rolled on an older version, - settings may be missing and as such it will not work as expected. If any plando is used in the file then requiring it + options may be missing and as such it will not work as expected. If any plando is used in the file then requiring it here to ensure it will be used is good practice. ## Game Options -One of your root settings will be the name of the game you would like to populate with settings. Since it is possible to +One of your root options will be the name of the game you would like to populate with options. Since it is possible to give a weight to any option, it is possible to have one file that can generate a seed for you where you don't know which game you'll play. For these cases you'll want to fill the game options for every game that can be rolled by these -settings. If a game can be rolled it **must** have a settings section even if it is empty. +settings. If a game can be rolled it **must** have an options section even if it is empty. ### Universal Game Options diff --git a/worlds/generic/docs/triggers_en.md b/worlds/generic/docs/triggers_en.md index dc5cf5c51ea7..73cca6654328 100644 --- a/worlds/generic/docs/triggers_en.md +++ b/worlds/generic/docs/triggers_en.md @@ -6,7 +6,7 @@ about 5 minutes to read. ## What are triggers? -Triggers allow you to customize your game settings by allowing you to define one or many options which only occur under +Triggers allow you to customize your game options by allowing you to define one or many options which only occur under specific conditions. These are essentially "if, then" statements for options in your game. A good example of what you can do with triggers is the [custom mercenary mode YAML ](https://github.com/alwaysintreble/Archipelago-yaml-dump/blob/main/Snippets/Mercenary%20Mode%20Snippet.yaml) that was @@ -148,4 +148,4 @@ In this example, if the `start_location` option rolls `landing_site`, only a sta If `aqueduct` is rolled, a starting hint for Gravity Suit will also be created alongside the hint for Morph Ball. Note that for lists, items can only be added, not removed or replaced. For dicts, defining a value for a present key will -replace that value within the dict. \ No newline at end of file +replace that value within the dict. diff --git a/worlds/minecraft/docs/minecraft_fr.md b/worlds/minecraft/docs/minecraft_fr.md index e25febba42f9..31c48151f491 100644 --- a/worlds/minecraft/docs/minecraft_fr.md +++ b/worlds/minecraft/docs/minecraft_fr.md @@ -16,7 +16,7 @@ guide : [Guide de configuration de base de Multiworld](/tutorial/Archipelago/se ### Où puis-je obtenir un fichier YAML ? -Vous pouvez personnaliser vos paramètres Minecraft en allant sur la [page des paramètres de joueur](/games/Minecraft/player-settings) +Vous pouvez personnaliser vos paramètres Minecraft en allant sur la [page des paramètres de joueur](/games/Minecraft/player-options) ## Rejoindre une partie MultiWorld @@ -71,4 +71,4 @@ les liens suivants sont les versions des logiciels que nous utilisons. - [Page des versions du mod Minecraft Archipelago Randomizer] (https://github.com/KonoTyran/Minecraft_AP_Randomizer/releases) - **NE PAS INSTALLER CECI SUR VOTRE CLIENT** - [Amazon Corretto](https://docs.aws.amazon.com/corretto/) - - choisissez la version correspondante et sélectionnez "Téléchargements" sur la gauche \ No newline at end of file + - choisissez la version correspondante et sélectionnez "Téléchargements" sur la gauche diff --git a/worlds/minecraft/docs/minecraft_sv.md b/worlds/minecraft/docs/minecraft_sv.md index e86d29393925..fd89d681ee37 100644 --- a/worlds/minecraft/docs/minecraft_sv.md +++ b/worlds/minecraft/docs/minecraft_sv.md @@ -103,8 +103,6 @@ shuffle_structures: off: 0 ``` -För mer detaljer om vad varje inställning gör, kolla standardinställningen `PlayerSettings.yaml` som kommer med -Archipelago-installationen. ## Gå med i ett Multivärld-spel diff --git a/worlds/musedash/docs/setup_es.md b/worlds/musedash/docs/setup_es.md index 0d737c26d726..1b16c7af3f54 100644 --- a/worlds/musedash/docs/setup_es.md +++ b/worlds/musedash/docs/setup_es.md @@ -2,7 +2,7 @@ ## Enlaces rápidos - [Página Principal](../../../../games/Muse%20Dash/info/en) -- [Página de Configuraciones](../../../../games/Muse%20Dash/player-settings) +- [Página de Configuraciones](../../../../games/Muse%20Dash/player-options) ## Software Requerido @@ -27,7 +27,7 @@ Si todo fue instalado correctamente, un botón aparecerá en la parte inferior derecha del juego una vez abierto, que te permitirá conectarte al servidor de Archipelago. ## Generar un juego MultiWorld -1. Entra a la página de [configuraciones de jugador](/games/Muse%20Dash/player-settings) y configura las opciones del juego a tu gusto. +1. Entra a la página de [configuraciones de jugador](/games/Muse%20Dash/player-options) y configura las opciones del juego a tu gusto. 2. Genera tu archivo YAML y úsalo para generar un juego nuevo en el radomizer - (Instrucciones sobre como generar un juego en Archipelago disponibles en la [guía web de Archipelago en Inglés](/tutorial/Archipelago/setup/en)) diff --git a/worlds/oot/docs/setup_fr.md b/worlds/oot/docs/setup_fr.md index f5915e18782f..40b0e8f571df 100644 --- a/worlds/oot/docs/setup_fr.md +++ b/worlds/oot/docs/setup_fr.md @@ -46,7 +46,7 @@ guide : [Guide de configuration de base de Multiworld](/tutorial/Archipelago/set ### Où puis-je obtenir un fichier de configuration (.yaml) ? -La page Paramètres du lecteur sur le site Web vous permet de configurer vos paramètres personnels et d'exporter un fichier de configuration depuis eux. Page des paramètres du joueur : [Page des paramètres du joueur d'Ocarina of Time](/games/Ocarina%20of%20Time/player-settings) +La page Paramètres du lecteur sur le site Web vous permet de configurer vos paramètres personnels et d'exporter un fichier de configuration depuis eux. Page des paramètres du joueur : [Page des paramètres du joueur d'Ocarina of Time](/games/Ocarina%20of%20Time/player-options) ### Vérification de votre fichier de configuration @@ -67,4 +67,4 @@ Une fois le client et l'émulateur démarrés, vous devez les connecter. Accéde Pour connecter le client au multiserveur, mettez simplement `:` dans le champ de texte en haut et appuyez sur Entrée (si le serveur utilise un mot de passe, tapez dans le champ de texte inférieur `/connect : [mot de passe]`) -Vous êtes maintenant prêt à commencer votre aventure dans Hyrule. \ No newline at end of file +Vous êtes maintenant prêt à commencer votre aventure dans Hyrule. diff --git a/worlds/pokemon_rb/docs/setup_es.md b/worlds/pokemon_rb/docs/setup_es.md index a6a6aa6ce793..9d87db224bb7 100644 --- a/worlds/pokemon_rb/docs/setup_es.md +++ b/worlds/pokemon_rb/docs/setup_es.md @@ -51,7 +51,7 @@ opciones. ### ¿Dónde puedo obtener un archivo YAML? -Puedes generar un archivo YAML or descargar su plantilla en la [página de configuración de jugador de Pokémon Red and Blue](/games/Pokemon%20Red%20and%20Blue/player-settings) +Puedes generar un archivo YAML or descargar su plantilla en la [página de configuración de jugador de Pokémon Red and Blue](/games/Pokemon%20Red%20and%20Blue/player-options) Es importante tener en cuenta que la opción `game_version` determina el ROM que será parcheado. Tanto el jugador como la persona que genera (si está generando localmente) necesitarán el archivo del ROM diff --git a/worlds/timespinner/docs/setup_de.md b/worlds/timespinner/docs/setup_de.md index 463568ecbdb4..e86474744676 100644 --- a/worlds/timespinner/docs/setup_de.md +++ b/worlds/timespinner/docs/setup_de.md @@ -42,7 +42,7 @@ Weitere Informationen zum Randomizer findest du hier: [ReadMe](https://github.co ## Woher bekomme ich eine Konfigurationsdatei? -Die [Player Settings](https://archipelago.gg/games/Timespinner/player-settings) Seite auf der Website erlaubt dir, +Die [Player Options](https://archipelago.gg/games/Timespinner/player-options) Seite auf der Website erlaubt dir, persönliche Einstellungen zu definieren und diese in eine Konfigurationsdatei zu exportieren * Die Timespinner Randomizer Option "StinkyMaw" ist in Archipelago Seeds aktuell immer an diff --git a/worlds/witness/docs/setup_en.md b/worlds/witness/docs/setup_en.md index daa9b8b9b5dd..7b6d631198f9 100644 --- a/worlds/witness/docs/setup_en.md +++ b/worlds/witness/docs/setup_en.md @@ -43,4 +43,4 @@ The Witness has a fully functional map tracker that supports auto-tracking. 3. Click on the "AP" symbol at the top. 4. Enter the AP address, slot name and password. -The rest should take care of itself! Items and checks will be marked automatically, and it even knows your settings - It will hide checks & adjust logic accordingly. +The rest should take care of itself! Items and checks will be marked automatically, and it even knows your options - It will hide checks & adjust logic accordingly. diff --git a/worlds/yoshisisland/docs/en_Yoshi's Island.md b/worlds/yoshisisland/docs/en_Yoshi's Island.md index 8cd825cc7f34..d6770c070b94 100644 --- a/worlds/yoshisisland/docs/en_Yoshi's Island.md +++ b/worlds/yoshisisland/docs/en_Yoshi's Island.md @@ -1,6 +1,6 @@ # Yoshi's Island -## Where is the settings page? +## Where is the options page? The [player options page for this game](../player-options) contains all the options you need to configure and export a config file. diff --git a/worlds/yoshisisland/docs/setup_en.md b/worlds/yoshisisland/docs/setup_en.md index 30aadbfa604d..4c8ffad7044c 100644 --- a/worlds/yoshisisland/docs/setup_en.md +++ b/worlds/yoshisisland/docs/setup_en.md @@ -39,7 +39,7 @@ guide: [Basic Multiworld Setup Guide](/tutorial/Archipelago/setup/en) ### Where do I get a config file? -The Player Options page on the website allows you to configure your personal settings and export a config file from +The Player Options page on the website allows you to configure your personal options and export a config file from them. ### Verifying your config file From 1021df8b1bfac76aefec9cd26cd1ff6149b0f457 Mon Sep 17 00:00:00 2001 From: Fabian Dill Date: Tue, 9 Apr 2024 00:24:38 +0200 Subject: [PATCH 005/153] Core: remove now unused stuff in Generate.py (#3035) --- Generate.py | 8 -------- 1 file changed, 8 deletions(-) diff --git a/Generate.py b/Generate.py index 91fe72221dce..a04e913d6eea 100644 --- a/Generate.py +++ b/Generate.py @@ -21,7 +21,6 @@ from Main import main as ERmain from settings import get_settings from Utils import parse_yamls, version_tuple, __version__, tuplize_version -from worlds.alttp import Options as LttPOptions from worlds.alttp.EntranceRandomizer import parse_arguments from worlds.alttp.Text import TextTable from worlds.AutoWorld import AutoWorldRegister @@ -311,13 +310,6 @@ def handle_name(name: str, player: int, name_counter: Counter): return new_name -def prefer_int(input_data: str) -> Union[str, int]: - try: - return int(input_data) - except: - return input_data - - def roll_percentage(percentage: Union[int, float]) -> bool: """Roll a percentage chance. percentage is expected to be in range [0, 100]""" From 14437d653f9f90f8bbc6b9398aca6426bdca3293 Mon Sep 17 00:00:00 2001 From: el-u <109771707+el-u@users.noreply.github.com> Date: Tue, 9 Apr 2024 00:33:34 +0200 Subject: [PATCH 006/153] lufia2ac: ability to swap party members mid-run and option to gain EXP while inactive (#2800) --- worlds/lufia2ac/Options.py | 17 +++- worlds/lufia2ac/__init__.py | 1 + worlds/lufia2ac/basepatch/basepatch.asm | 85 +++++++++++++++++- worlds/lufia2ac/basepatch/basepatch.bsdiff4 | Bin 8652 -> 8836 bytes .../lufia2ac/docs/en_Lufia II Ancient Cave.md | 5 +- 5 files changed, 101 insertions(+), 7 deletions(-) diff --git a/worlds/lufia2ac/Options.py b/worlds/lufia2ac/Options.py index 5f33d0bd5d13..1b3a39ddeb5f 100644 --- a/worlds/lufia2ac/Options.py +++ b/worlds/lufia2ac/Options.py @@ -593,6 +593,20 @@ class HealingFloorChance(Range): default = 16 +class InactiveExpGain(Choice): + """The rate at which characters not currently in the active party gain EXP. + + Supported values: disabled, half, full + Default value: disabled (same as in an unmodified game) + """ + + display_name = "Inactive character EXP gain" + option_disabled = 0 + option_half = 50 + option_full = 100 + default = option_disabled + + class InitialFloor(Range): """The initial floor, where you begin your journey. @@ -805,7 +819,7 @@ class ShufflePartyMembers(Toggle): false — all 6 optional party members are present in the cafe and can be recruited right away true — only Maxim is available from the start; 6 new "items" are added to your pool and shuffled into the multiworld; when one of these items is found, the corresponding party member is unlocked for you to use. - While cave diving, you can add newly unlocked ones to your party by using the character items from the inventory + While cave diving, you can add or remove unlocked party members by using the character items from the inventory Default value: false (same as in an unmodified game) """ @@ -838,6 +852,7 @@ class L2ACOptions(PerGameCommonOptions): goal: Goal gold_modifier: GoldModifier healing_floor_chance: HealingFloorChance + inactive_exp_gain: InactiveExpGain initial_floor: InitialFloor iris_floor_chance: IrisFloorChance iris_treasures_required: IrisTreasuresRequired diff --git a/worlds/lufia2ac/__init__.py b/worlds/lufia2ac/__init__.py index 9bd436fa0d2f..561429c825f3 100644 --- a/worlds/lufia2ac/__init__.py +++ b/worlds/lufia2ac/__init__.py @@ -232,6 +232,7 @@ def generate_output(self, output_directory: str) -> None: rom_bytearray[0x280018:0x280018 + 1] = self.o.shuffle_party_members.unlock.to_bytes(1, "little") rom_bytearray[0x280019:0x280019 + 1] = self.o.shuffle_capsule_monsters.unlock.to_bytes(1, "little") rom_bytearray[0x28001A:0x28001A + 1] = self.o.shop_interval.value.to_bytes(1, "little") + rom_bytearray[0x28001B:0x28001B + 1] = self.o.inactive_exp_gain.value.to_bytes(1, "little") rom_bytearray[0x280030:0x280030 + 1] = self.o.goal.value.to_bytes(1, "little") rom_bytearray[0x28003D:0x28003D + 1] = self.o.death_link.value.to_bytes(1, "little") rom_bytearray[0x281200:0x281200 + 470] = self.get_capsule_cravings_table() diff --git a/worlds/lufia2ac/basepatch/basepatch.asm b/worlds/lufia2ac/basepatch/basepatch.asm index f9c48a5fecd1..f25d4deada10 100644 --- a/worlds/lufia2ac/basepatch/basepatch.asm +++ b/worlds/lufia2ac/basepatch/basepatch.asm @@ -309,6 +309,12 @@ org $8EFD2E ; unused region at the end of bank $8E DB $1E,$0B,$01,$2B,$05,$1A,$05,$00 ; add dekar DB $1E,$0B,$01,$2B,$04,$1A,$06,$00 ; add tia DB $1E,$0B,$01,$2B,$06,$1A,$07,$00 ; add lexis + DB $1F,$0B,$01,$2C,$01,$1B,$02,$00 ; remove selan + DB $1F,$0B,$01,$2C,$02,$1B,$03,$00 ; remove guy + DB $1F,$0B,$01,$2C,$03,$1B,$04,$00 ; remove arty + DB $1F,$0B,$01,$2C,$05,$1B,$05,$00 ; remove dekar + DB $1F,$0B,$01,$2C,$04,$1B,$06,$00 ; remove tia + DB $1F,$0B,$01,$2C,$06,$1B,$07,$00 ; remove lexis pullpc SpecialItemUse: @@ -328,11 +334,15 @@ SpecialItemUse: SEP #$20 LDA $8ED8C7,X ; load predefined bitmask with a single bit set BIT $077E ; check against EV flags $02 to $07 (party member flags) - BNE + ; abort if character already present - LDA $07A9 ; load EV register $11 (party counter) + BEQ ++ + LDA.b #$30 ; character already present; modify pointer to point to L2SASM leave script + ADC $09B7 + STA $09B7 + BRA +++ +++: LDA $07A9 ; character not present; load EV register $0B (party counter) CMP.b #$03 BPL + ; abort if party full - LDA.b #$8E ++++ LDA.b #$8E STA $09B9 PHK PEA ++ @@ -340,7 +350,6 @@ SpecialItemUse: JML $83BB76 ; initialize parser variables ++: NOP JSL $809CB8 ; call L2SASM parser - JSL $81F034 ; consume the item TSX INX #13 TXS @@ -490,6 +499,73 @@ pullpc +; allow inactive characters to gain exp +pushpc +org $81DADD + ; DB=$81, x=0, m=1 + NOP ; overwrites BNE $81DAE2 : JMP $DBED + JML HandleActiveExp +AwardExp: + ; isolate exp distribution into a subroutine, to be reused for both active party members and inactive characters +org $81DAE9 + NOP #2 ; overwrites JMP $DBBD + RTL +org $81DB42 + NOP #2 ; overwrites JMP $DBBD + RTL +org $81DD11 + ; DB=$81, x=0, m=1 + JSL HandleInactiveExp ; overwrites LDA $0A8A : CLC +pullpc + +HandleActiveExp: + BNE + ; (overwritten instruction; modified) check if statblock not empty + JML $81DBED ; (overwritten instruction; modified) abort ++: JSL AwardExp ; award exp (X=statblock pointer, Y=position in battle order, $00=position in menu order) + JML $81DBBD ; (overwritten instruction; modified) continue to next level text + +HandleInactiveExp: + LDA $F0201B ; load inactive exp gain rate + BEQ + ; zero gain; skip everything + CMP.b #$64 + BCS ++ ; full gain + LSR $1607 + ROR $1606 ; half gain + ROR $1605 +++: LDY.w #$0000 ; start looping through all characters +-: TDC + TYA + LDX.w #$0003 ; start looping through active party +--: CMP $0A7B,X + BEQ ++ ; skip if character in active party + DEX + BPL -- ; continue looping through active party + STA $153D ; inactive character detected; overwrite character index of 1st slot in party battle order + ASL + TAX + REP #$20 + LDA $859EBA,X ; convert character index to statblock pointer + SEP #$20 + TAX + PHY ; stash character loop index + LDY $0A80 + PHY ; stash 1st (in menu order) party member statblock pointer + STX $0A80 ; overwrite 1st (in menu order) party member statblock pointer + LDY.w #$0000 ; set to use 1st position (in battle order) + STY $00 ; set to use 1st position (in menu order) + JSL AwardExp ; award exp (X=statblock pointer, Y=position in battle order, $00=position in menu order) + PLY ; restore 1st (in menu order) party member statblock pointer + STY $0A80 + PLY ; restore character loop index +++: INY + CPY.w #$0007 + BCC - ; continue looping through all characters ++: LDA $0A8A ; (overwritten instruction) load current gold + CLC ; (overwritten instruction) + RTL + + + ; receive death link pushpc org $83BC91 @@ -1226,6 +1302,7 @@ pullpc ; $F02018 1 party members available ; $F02019 1 capsule monsters available ; $F0201A 1 shop interval +; $F0201B 1 inactive exp gain rate ; $F02030 1 selected goal ; $F02031 1 goal completion: boss ; $F02032 1 goal completion: iris_treasure_hunt diff --git a/worlds/lufia2ac/basepatch/basepatch.bsdiff4 b/worlds/lufia2ac/basepatch/basepatch.bsdiff4 index 664e197c4a1929f6958c1245b11750716b7a9d7e..1dfade445e14a4e01e4f5fc1c598f1ffbab67f2d 100644 GIT binary patch literal 8836 zcmZ{}Wl$6h)c3uxbV--QE=z;tQo`a=E8R#d%`Ty|gh(UZxggCF(jnd5wKRg#Af=Ru z=zGom%=_G*p8tmvb7sz*Idf*tho7Q>vKj&b6`{fb{Exz!{*MO$ME)mGG(*aWDwuK` zn9jLu388~ysR$ap z!397To(KZZiXUwY&w*nXv>Porv0 zfO*u1I|L6&&m|3a{0+3KJ&^URlJue!%8SM+f#*PJi7%XITB0t#1uR-d|3z0@&{|nB zg&8^Fl8^k##eiCTeEH&jn#NP;Y!67OOgn9k z8RHbab7KqNQqNi~3p`7?Yanjg*tStV_)2`+sTc|1W%{abX9@#kjWQZmw6A72eirU!T4F?YN;khqzz4KaaR^ z+zL3#mxor2?{w$g%+&Yl`4662r=p7@G z0A_3GPbEai9!#MCddK+9}gf12F#U}1F-~f2Q-QRO}n7TjYf&!Eg*>OQm?Qp zX@4+zhOT00hqB{5EcT+T*r4B@VE%nMc?lHf7>2;kGLx4)rUf7uhyd5jNcKvc0w9)6 zuke^L7?)X3ha)Z<2I_+XT%VWw2g9_W$Wi1qvp@X5gF`X_fQT@KVmLWD6JT~00DuC3 z@c%4XFc417g@-q)1=ED1Dh?Omi!hP73d|x~wpcbMtE}SK-^oE0ri8sT{D~&WG0;(7 z)f7Yfe<-;IBH|w@KGws;K@^%{h)B3^;qfB_EKU*%6PcCxDu`0rI{SMVMFQa!;S^)! zx{rpqXX2iBR;U!OC<#NgfDB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DAdw!EEIpDR*p4}-upwD{*Pua0oMR*XzE@T6J`~|5m0!g9a5AG&M9PA{(F+;q@lX- zn$gHD$^j__VPBN4sg&u`P-dQORV9qgy6|0$b$me#K-bycN`_E9+m;pm z%hDdQgxq6do_tqQVduO>J1$03fnsrE@+M}x<`pjWAS4~QMa!d{v4nhLC{Czq0fbYV zBv9f6!MXu&?vU4?r0HI4b?nQi@RIN)B=F%9f3y6Uaok7TmZ8fP-^sfo3FV!fFO*M)1jhcdd~X3^K}|w?YqZ2KQt?esMr$kAYuOlrGNRq diff --git a/worlds/lufia2ac/docs/en_Lufia II Ancient Cave.md b/worlds/lufia2ac/docs/en_Lufia II Ancient Cave.md index 1080a77d54f4..4b5bf3f318fa 100644 --- a/worlds/lufia2ac/docs/en_Lufia II Ancient Cave.md +++ b/worlds/lufia2ac/docs/en_Lufia II Ancient Cave.md @@ -53,8 +53,9 @@ Your Party Leader will hold up the item they received when not in a fight or in - Randomize enemy movement patterns, enemy sprites, and which enemy types can appear at which floor numbers - Option to make shops appear in the cave so that you have a way to spend your hard-earned gold - Option to shuffle your party members and/or capsule monsters into the multiworld, meaning that someone will have to - find them in order to unlock them for you to use. While cave diving, you can add newly unlocked members to your party - by using the character items from your inventory + find them in order to unlock them for you to use. While cave diving, you can add or remove unlocked party members by + using the character items from your inventory. There's also an option to allow inactive characters to gain some EXP, + so that new party members added during a run don't have to start off at a low level ###### Quality of life: From 32c92e03e7ceb301486a648da95b88fbe05ef00a Mon Sep 17 00:00:00 2001 From: qwint Date: Tue, 9 Apr 2024 14:12:50 -0500 Subject: [PATCH 007/153] Hollow Knight: Adding Godhome Goal Logic (#2952) --- worlds/hk/GodhomeData.py | 55 ++++++++++++++++++++++++++++++++++++++++ worlds/hk/Items.py | 4 +++ worlds/hk/Options.py | 4 +-- worlds/hk/Rules.py | 2 ++ worlds/hk/__init__.py | 10 ++++++++ 5 files changed, 73 insertions(+), 2 deletions(-) create mode 100644 worlds/hk/GodhomeData.py diff --git a/worlds/hk/GodhomeData.py b/worlds/hk/GodhomeData.py new file mode 100644 index 000000000000..6e9d77f4dc47 --- /dev/null +++ b/worlds/hk/GodhomeData.py @@ -0,0 +1,55 @@ +from functools import partial + + +godhome_event_names = ["Godhome_Flower_Quest", "Defeated_Pantheon_5", "GG_Atrium_Roof", "Defeated_Pantheon_1", "Defeated_Pantheon_2", "Defeated_Pantheon_3", "Opened_Pantheon_4", "Defeated_Pantheon_4", "GG_Atrium", "Hit_Pantheon_5_Unlock_Orb", "GG_Workshop", "Can_Damage_Crystal_Guardian", 'Defeated_Any_Soul_Warrior', "Defeated_Colosseum_3", "COMBAT[Radiance]", "COMBAT[Pantheon_1]", "COMBAT[Pantheon_2]", "COMBAT[Pantheon_3]", "COMBAT[Pantheon_4]", "COMBAT[Pantheon_5]", "COMBAT[Colosseum_3]", 'Warp-Junk_Pit_to_Godhome', 'Bench-Godhome_Atrium', 'Bench-Hall_of_Gods', "GODTUNERUNLOCK", "GG_Waterways", "Warp-Godhome_to_Junk_Pit", "NAILCOMBAT", "BOSS", "AERIALMINIBOSS"] + + +def set_godhome_rules(hk_world, hk_set_rule): + player = hk_world.player + fn = partial(hk_set_rule, hk_world) + + required_events = { + "Godhome_Flower_Quest": lambda state: state.count('Defeated_Pantheon_5', player) and state.count('Room_Mansion[left1]', player) and state.count('Fungus3_49[right1]', player), + + "Defeated_Pantheon_5": lambda state: state.has('GG_Atrium_Roof', player) and state.has('WINGS', player) and (state.has('LEFTCLAW', player) or state.has('RIGHTCLAW', player)) and ((state.has('Defeated_Pantheon_1', player) and state.has('Defeated_Pantheon_2', player) and state.has('Defeated_Pantheon_3', player) and state.has('Defeated_Pantheon_4', player) and state.has('COMBAT[Radiance]', player))), + "GG_Atrium_Roof": lambda state: state.has('GG_Atrium', player) and state.has('Hit_Pantheon_5_Unlock_Orb', player) and state.has('LEFTCLAW', player), + + "Defeated_Pantheon_1": lambda state: state.has('GG_Atrium', player) and ((state.has('Defeated_Gruz_Mother', player) and state.has('Defeated_False_Knight', player) and (state.has('Fungus1_29[left1]', player) or state.has('Fungus1_29[right1]', player)) and state.has('Defeated_Hornet_1', player) and state.has('Defeated_Gorb', player) and state.has('Defeated_Dung_Defender', player) and state.has('Defeated_Any_Soul_Warrior', player) and state.has('Defeated_Brooding_Mawlek', player))), + "Defeated_Pantheon_2": lambda state: state.has('GG_Atrium', player) and ((state.has('Defeated_Xero', player) and state.has('Defeated_Crystal_Guardian', player) and state.has('Defeated_Soul_Master', player) and state.has('Defeated_Colosseum_2', player) and state.has('Defeated_Mantis_Lords', player) and state.has('Defeated_Marmu', player) and state.has('Defeated_Nosk', player) and state.has('Defeated_Flukemarm', player) and state.has('Defeated_Broken_Vessel', player))), + "Defeated_Pantheon_3": lambda state: state.has('GG_Atrium', player) and ((state.has('Defeated_Hive_Knight', player) and state.has('Defeated_Elder_Hu', player) and state.has('Defeated_Collector', player) and state.has('Defeated_Colosseum_2', player) and state.has('Defeated_Grimm', player) and state.has('Defeated_Galien', player) and state.has('Defeated_Uumuu', player) and state.has('Defeated_Hornet_2', player))), + "Opened_Pantheon_4": lambda state: state.has('GG_Atrium', player) and (state.has('Defeated_Pantheon_1', player) and state.has('Defeated_Pantheon_2', player) and state.has('Defeated_Pantheon_3', player)), + "Defeated_Pantheon_4": lambda state: state.has('GG_Atrium', player) and state.has('Opened_Pantheon_4', player) and ((state.has('Defeated_Enraged_Guardian', player) and state.has('Defeated_Broken_Vessel', player) and state.has('Defeated_No_Eyes', player) and state.has('Defeated_Traitor_Lord', player) and state.has('Defeated_Dung_Defender', player) and state.has('Defeated_False_Knight', player) and state.has('Defeated_Markoth', player) and state.has('Defeated_Watcher_Knights', player) and state.has('Defeated_Soul_Master', player))), + "GG_Atrium": lambda state: state.has('Warp-Junk_Pit_to_Godhome', player) and (state.has('RIGHTCLAW', player) or state.has('WINGS', player) or state.has('LEFTCLAW', player) and state.has('RIGHTSUPERDASH', player)) or state.has('GG_Workshop', player) and (state.has('LEFTCLAW', player) or state.has('RIGHTCLAW', player) and state.has('WINGS', player)) or state.has('Bench-Godhome_Atrium', player), + "Hit_Pantheon_5_Unlock_Orb": lambda state: state.has('GG_Atrium', player) and state.has('WINGS', player) and (state.has('LEFTCLAW', player) or state.has('RIGHTCLAW', player)) and (((state.has('Queen_Fragment', player) and state.has('King_Fragment', player) and state.has('Void_Heart', player)) and state.has('Defeated_Pantheon_1', player) and state.has('Defeated_Pantheon_2', player) and state.has('Defeated_Pantheon_3', player) and state.has('Defeated_Pantheon_4', player))), + "GG_Workshop": lambda state: state.has('GG_Atrium', player) or state.has('Bench-Hall_of_Gods', player), + "Can_Damage_Crystal_Guardian": lambda state: state.has('UPSLASH', player) or state.has('LEFTSLASH', player) or state.has('RIGHTSLASH', player) or state._hk_option(player, 'ProficientCombat') and (state.has('CYCLONE', player) or state.has('Great_Slash', player)) or (state._hk_option(player, 'DifficultSkips') and state._hk_option(player, 'ProficientCombat')) and (state.has('CYCLONE', player) or state.has('Great_Slash', player)) and (state.has('DREAMNAIL', player) and (state.has('SPELLS', player) or state.has('FOCUS', player) and state.has('Spore_Shroom', player) or state.has('Glowing_Womb', player)) or state.has('Weaversong', player)), + 'Defeated_Any_Soul_Warrior': lambda state: state.has('Defeated_Sanctum_Warrior', player) or state.has('Defeated_Elegant_Warrior', player) or state.has('Room_Colosseum_01[left1]', player) and state.has('Defeated_Colosseum_3', player), + "Defeated_Colosseum_3": lambda state: state.has('Room_Colosseum_01[left1]', player) and state.has('Can_Replenish_Geo', player) and ((state.has('LEFTCLAW', player) or state.has('RIGHTCLAW', player)) or ((state._hk_option(player, 'DifficultSkips') and state._hk_option(player, 'ProficientCombat')) and state.has('WINGS', player))) and state.has('COMBAT[Colosseum_3]', player), + + # MACROS + "COMBAT[Radiance]": lambda state: (state.has('LEFTDASH', player) and state.has('RIGHTDASH', player)) and ((((state.count('LEFTDASH', player) > 1 or state.count('RIGHTDASH', player) > 1) and state.has('LEFTDASH', player)) and ((state.count('LEFTDASH', player) > 1 or state.count('RIGHTDASH', player) > 1) and state.has('RIGHTDASH', player))) or state.has('QUAKE', player)) and (state.count('FIREBALL', player) > 1 and state.has('UPSLASH', player) or state.count('SCREAM', player) > 1 and state.has('UPSLASH', player) or state._hk_option(player, 'RemoveSpellUpgrades') and (state.has('FIREBALL', player) or state.has('SCREAM', player)) and state.has('UPSLASH', player) or state._hk_option(player, 'ProficientCombat') and (state.has('FIREBALL', player) or state.has('SCREAM', player)) and (state.has('UPSLASH', player) or (state.has('LEFTSLASH', player) or state.has('RIGHTSLASH', player)) or state.has('Great_Slash', player)) or (state._hk_option(player, 'DifficultSkips') and state._hk_option(player, 'ProficientCombat'))), + "COMBAT[Pantheon_1]": lambda state: state.has('AERIALMINIBOSS', player) and state.count('SPELLS', player) > 1 and (state.has('FOCUS', player) or (state._hk_option(player, 'DifficultSkips') and state._hk_option(player, 'ProficientCombat'))), + "COMBAT[Pantheon_2]": lambda state: state.has('AERIALMINIBOSS', player) and state.count('SPELLS', player) > 1 and (state.has('FOCUS', player) or (state._hk_option(player, 'DifficultSkips') and state._hk_option(player, 'ProficientCombat'))) and state.has('Can_Damage_Crystal_Guardian', player), + "COMBAT[Pantheon_3]": lambda state: state.has('AERIALMINIBOSS', player) and state.count('SPELLS', player) > 1 and (state.has('FOCUS', player) or (state._hk_option(player, 'DifficultSkips') and state._hk_option(player, 'ProficientCombat'))), + "COMBAT[Pantheon_4]": lambda state: state.has('AERIALMINIBOSS', player) and (state.has('FOCUS', player) or (state._hk_option(player, 'DifficultSkips') and state._hk_option(player, 'ProficientCombat'))) and state.has('Can_Damage_Crystal_Guardian', player) and (state.has('LEFTDASH', player) and state.has('RIGHTDASH', player)) and ((((state.count('LEFTDASH', player) > 1 or state.count('RIGHTDASH', player) > 1) and state.has('LEFTDASH', player)) and ((state.count('LEFTDASH', player) > 1 or state.count('RIGHTDASH', player) > 1) and state.has('RIGHTDASH', player))) or state.has('QUAKE', player)) and (state.count('FIREBALL', player) > 1 and state.has('UPSLASH', player) or state.count('SCREAM', player) > 1 and state.has('UPSLASH', player) or state._hk_option(player, 'RemoveSpellUpgrades') and (state.has('FIREBALL', player) or state.has('SCREAM', player)) and state.has('UPSLASH', player) or state._hk_option(player, 'ProficientCombat') and (state.has('FIREBALL', player) or state.has('SCREAM', player)) and (state.has('UPSLASH', player) or (state.has('LEFTSLASH', player) or state.has('RIGHTSLASH', player)) or state.has('Great_Slash', player)) or (state._hk_option(player, 'DifficultSkips') and state._hk_option(player, 'ProficientCombat'))), + "COMBAT[Pantheon_5]": lambda state: state.has('AERIALMINIBOSS', player) and state.has('FOCUS', player) and state.has('Can_Damage_Crystal_Guardian', player) and (state.has('LEFTDASH', player) and state.has('RIGHTDASH', player)) and ((((state.count('LEFTDASH', player) > 1 or state.count('RIGHTDASH', player) > 1) and state.has('LEFTDASH', player)) and ((state.count('LEFTDASH', player) > 1 or state.count('RIGHTDASH', player) > 1) and state.has('RIGHTDASH', player))) or state.has('QUAKE', player)) and (state.count('FIREBALL', player) > 1 and state.has('UPSLASH', player) or state.count('SCREAM', player) > 1 and state.has('UPSLASH', player) or state._hk_option(player, 'RemoveSpellUpgrades') and (state.has('FIREBALL', player) or state.has('SCREAM', player)) and state.has('UPSLASH', player) or state._hk_option(player, 'ProficientCombat') and (state.has('FIREBALL', player) or state.has('SCREAM', player)) and (state.has('UPSLASH', player) or (state.has('LEFTSLASH', player) or state.has('RIGHTSLASH', player)) or state.has('Great_Slash', player)) or (state._hk_option(player, 'DifficultSkips') and state._hk_option(player, 'ProficientCombat'))), + "COMBAT[Colosseum_3]": lambda state: state.has('BOSS', player) and (state.has('FOCUS', player) or (state._hk_option(player, 'DifficultSkips') and state._hk_option(player, 'ProficientCombat'))), + + # MISC + 'Warp-Junk_Pit_to_Godhome': lambda state: state.has('GG_Waterways', player) and state.has('GODTUNERUNLOCK', player) and state.has('DREAMNAIL', player), + 'Bench-Godhome_Atrium': lambda state: state.has('GG_Atrium', player) and (state.has('RIGHTCLAW', player) and (state.has('RIGHTDASH', player) or state.has('LEFTCLAW', player) and state.has('RIGHTSUPERDASH', player) or state.has('WINGS', player)) or state.has('LEFTCLAW', player) and state.has('WINGS', player)), + 'Bench-Hall_of_Gods': lambda state: state.has('GG_Workshop', player) and ((state.has('LEFTCLAW', player) or state.has('RIGHTCLAW', player))), + + "GODTUNERUNLOCK": lambda state: state.count('SIMPLE', player) > 3, + "GG_Waterways": lambda state: state.has('GG_Waterways[door1]', player) or state.has('GG_Waterways[right1]', player) and (state.has('LEFTSUPERDASH', player) or state.has('SWIM', player)) or state.has('Warp-Godhome_to_Junk_Pit', player), + "Warp-Godhome_to_Junk_Pit": lambda state: state.has('Warp-Junk_Pit_to_Godhome', player) or state.has('GG_Atrium', player), + + # COMBAT MACROS + "NAILCOMBAT": lambda state: (state.has('LEFTSLASH', player) or state.has('RIGHTSLASH', player)) or state.has('UPSLASH', player) or state._hk_option(player, 'ProficientCombat') and (state.has('CYCLONE', player) or state.has('Great_Slash', player)) or (state._hk_option(player, 'DifficultSkips') and state._hk_option(player, 'ProficientCombat')), + "BOSS": lambda state: state.count('SPELLS', player) > 1 and ((state.has('LEFTDASH', player) or state.has('RIGHTDASH', player)) and ((state.has('LEFTSLASH', player) or state.has('RIGHTSLASH', player)) or state.has('UPSLASH', player)) or state._hk_option(player, 'ProficientCombat') and state.has('NAILCOMBAT', player)), + "AERIALMINIBOSS": lambda state: (state.has('FIREBALL', player) or state.has('SCREAM', player)) and (state.has('LEFTDASH', player) or state.has('RIGHTDASH', player)) and ((state.has('LEFTSLASH', player) or state.has('RIGHTSLASH', player)) or state.has('UPSLASH', player)) or state._hk_option(player, 'ProficientCombat') and (state.has('FIREBALL', player) or state.has('SCREAM', player)) and ((state.has('LEFTSLASH', player) or state.has('RIGHTSLASH', player)) or state.has('UPSLASH', player)) or (state._hk_option(player, 'DifficultSkips') and state._hk_option(player, 'ProficientCombat')) and ((state.has('LEFTSLASH', player) or state.has('RIGHTSLASH', player)) or state.has('UPSLASH', player) or state.has('CYCLONE', player) or state.has('Great_Slash', player)), + + } + + for item, rule in required_events.items(): + fn(item, rule) diff --git a/worlds/hk/Items.py b/worlds/hk/Items.py index 72878dfc714c..0d4ab3d55f1e 100644 --- a/worlds/hk/Items.py +++ b/worlds/hk/Items.py @@ -1,5 +1,6 @@ from typing import Dict, Set, NamedTuple from .ExtractedData import items, logic_items, item_effects +from .GodhomeData import godhome_event_names item_table = {} @@ -14,6 +15,9 @@ class HKItemData(NamedTuple): item_table[item_name] = HKItemData(advancement=item_name in logic_items or item_name in item_effects, id=i, type=item_type) +for item_name in godhome_event_names: + item_table[item_name] = HKItemData(advancement=True, id=None, type=None) + lookup_id_to_name: Dict[int, str] = {data.id: item_name for item_name, data in item_table.items()} lookup_type_to_names: Dict[str, Set[str]] = {} for item, item_data in item_table.items(): diff --git a/worlds/hk/Options.py b/worlds/hk/Options.py index 70c7c1689661..f7b4420c7447 100644 --- a/worlds/hk/Options.py +++ b/worlds/hk/Options.py @@ -397,8 +397,8 @@ class Goal(Choice): option_hollowknight = 1 option_siblings = 2 option_radiance = 3 - # Client support exists for this, but logic is a nightmare - # option_godhome = 4 + option_godhome = 4 + option_godhome_flower = 5 default = 0 diff --git a/worlds/hk/Rules.py b/worlds/hk/Rules.py index 2dc512eca76e..a3c7e13cf02b 100644 --- a/worlds/hk/Rules.py +++ b/worlds/hk/Rules.py @@ -1,6 +1,7 @@ from ..generic.Rules import set_rule, add_rule from ..AutoWorld import World from .GeneratedRules import set_generated_rules +from .GodhomeData import set_godhome_rules from typing import NamedTuple @@ -39,6 +40,7 @@ def hk_set_rule(hk_world: World, location: str, rule): def set_rules(hk_world: World): player = hk_world.player set_generated_rules(hk_world, hk_set_rule) + set_godhome_rules(hk_world, hk_set_rule) # Shop costs for location in hk_world.multiworld.get_locations(player): diff --git a/worlds/hk/__init__.py b/worlds/hk/__init__.py index 25337598ec0a..4057cded9a5b 100644 --- a/worlds/hk/__init__.py +++ b/worlds/hk/__init__.py @@ -307,6 +307,12 @@ def _add(item_name: str, location_name: str, randomized: bool): randomized = True _add("Elevator_Pass", "Elevator_Pass", randomized) + # check for any goal that godhome events are relevant to + if self.multiworld.Goal[self.player] in [Goal.option_godhome, Goal.option_godhome_flower]: + from .GodhomeData import godhome_event_names + for item_name in godhome_event_names: + _add(item_name, item_name, False) + for shop, locations in self.created_multi_locations.items(): for _ in range(len(locations), getattr(self.multiworld, shop_to_option[shop])[self.player].value): loc = self.create_location(shop) @@ -431,6 +437,10 @@ def set_rules(self): world.completion_condition[player] = lambda state: state._hk_siblings_ending(player) elif goal == Goal.option_radiance: world.completion_condition[player] = lambda state: state._hk_can_beat_radiance(player) + elif goal == Goal.option_godhome: + world.completion_condition[player] = lambda state: state.count("Defeated_Pantheon_5", player) + elif goal == Goal.option_godhome_flower: + world.completion_condition[player] = lambda state: state.count("Godhome_Flower_Quest", player) else: # Any goal world.completion_condition[player] = lambda state: state._hk_can_beat_thk(player) or state._hk_can_beat_radiance(player) From b007a42487f35ddf464ba63e0d4bf1850c9116ff Mon Sep 17 00:00:00 2001 From: Rjosephson Date: Tue, 9 Apr 2024 13:14:18 -0600 Subject: [PATCH 008/153] Ror2: Add progressive stages option (#2813) --- worlds/ror2/__init__.py | 27 +++++++++++++++++++++------ worlds/ror2/docs/en_Risk of Rain 2.md | 1 - worlds/ror2/items.py | 2 +- worlds/ror2/options.py | 13 +++++++++++++ worlds/ror2/rules.py | 23 ++++++++++------------- worlds/ror2/test/test_mithrix_goal.py | 4 +++- 6 files changed, 48 insertions(+), 22 deletions(-) diff --git a/worlds/ror2/__init__.py b/worlds/ror2/__init__.py index 6574a176dc2d..5afdb797e7de 100644 --- a/worlds/ror2/__init__.py +++ b/worlds/ror2/__init__.py @@ -44,8 +44,8 @@ class RiskOfRainWorld(World): } location_name_to_id = item_pickups - data_version = 8 - required_client_version = (0, 4, 4) + data_version = 9 + required_client_version = (0, 4, 5) web = RiskOfWeb() total_revivals: int @@ -91,6 +91,17 @@ def create_items(self) -> None: # only mess with the environments if they are set as items if self.options.goal == "explore": + # check to see if the user doesn't want to use stages, and to figure out what type of stages are being used. + if not self.options.require_stages: + if not self.options.progressive_stages: + self.multiworld.push_precollected(self.multiworld.create_item("Stage 1", self.player)) + self.multiworld.push_precollected(self.multiworld.create_item("Stage 2", self.player)) + self.multiworld.push_precollected(self.multiworld.create_item("Stage 3", self.player)) + self.multiworld.push_precollected(self.multiworld.create_item("Stage 4", self.player)) + else: + for _ in range(4): + self.multiworld.push_precollected(self.multiworld.create_item("Progressive Stage", self.player)) + # figure out all available ordered stages for each tier environment_available_orderedstages_table = environment_vanilla_orderedstages_table if self.options.dlc_sotv: @@ -121,8 +132,12 @@ def create_items(self) -> None: total_locations = self.options.total_locations.value else: # explore mode - # Add Stage items for logic gates - itempool += ["Stage 1", "Stage 2", "Stage 3", "Stage 4"] + + # Add Stage items to the pool + if self.options.require_stages: + itempool += ["Stage 1", "Stage 2", "Stage 3", "Stage 4"] if not self.options.progressive_stages else \ + ["Progressive Stage"] * 4 + total_locations = len( get_locations( chests=self.options.chests_per_stage.value, @@ -206,8 +221,8 @@ def fill_slot_data(self) -> Dict[str, Any]: options_dict = self.options.as_dict("item_pickup_step", "shrine_use_step", "goal", "victory", "total_locations", "chests_per_stage", "shrines_per_stage", "scavengers_per_stage", "scanner_per_stage", "altars_per_stage", "total_revivals", - "start_with_revive", "final_stage_death", "death_link", - casing="camel") + "start_with_revive", "final_stage_death", "death_link", "require_stages", + "progressive_stages", casing="camel") return { **options_dict, "seed": "".join(self.random.choice(string.digits) for _ in range(16)), diff --git a/worlds/ror2/docs/en_Risk of Rain 2.md b/worlds/ror2/docs/en_Risk of Rain 2.md index b2210e348d50..651c89a33923 100644 --- a/worlds/ror2/docs/en_Risk of Rain 2.md +++ b/worlds/ror2/docs/en_Risk of Rain 2.md @@ -57,7 +57,6 @@ options apply, so each Risk of Rain 2 player slot in the multiworld needs to be for example, have two players trade off hosting and making progress on each other's player slot, but a single co-op instance can't make progress towards multiple player slots in the multiworld. -Explore mode is untested in multiplayer and will likely not work until a later release. ## What Risk of Rain items can appear in other players' worlds? diff --git a/worlds/ror2/items.py b/worlds/ror2/items.py index 449686d04bf0..3586030816e9 100644 --- a/worlds/ror2/items.py +++ b/worlds/ror2/items.py @@ -59,7 +59,7 @@ class RiskOfRainItemData(NamedTuple): "Stage 2": RiskOfRainItemData("Stage", 2 + stage_offset, ItemClassification.progression), "Stage 3": RiskOfRainItemData("Stage", 3 + stage_offset, ItemClassification.progression), "Stage 4": RiskOfRainItemData("Stage", 4 + stage_offset, ItemClassification.progression), - + "Progressive Stage": RiskOfRainItemData("Stage", 5 + stage_offset, ItemClassification.progression), } item_table = {**upgrade_table, **other_table, **filler_table, **trap_table, **stage_table} diff --git a/worlds/ror2/options.py b/worlds/ror2/options.py index abb8e91da25e..066c8c8545a8 100644 --- a/worlds/ror2/options.py +++ b/worlds/ror2/options.py @@ -151,6 +151,17 @@ class DLC_SOTV(Toggle): display_name = "Enable DLC - SOTV" +class RequireStages(DefaultOnToggle): + """Add Stage items to the pool to block access to the next set of environments.""" + display_name = "Require Stages" + + +class ProgressiveStages(DefaultOnToggle): + """This will convert Stage items to be a progressive item. For example instead of "Stage 2" it would be + "Progressive Stage" """ + display_name = "Progressive Stages" + + class GreenScrap(Range): """Weight of Green Scraps in the item pool. @@ -378,6 +389,8 @@ class ROR2Options(PerGameCommonOptions): start_with_revive: StartWithRevive final_stage_death: FinalStageDeath dlc_sotv: DLC_SOTV + require_stages: RequireStages + progressive_stages: ProgressiveStages death_link: DeathLink item_pickup_step: ItemPickupStep shrine_use_step: ShrineUseStep diff --git a/worlds/ror2/rules.py b/worlds/ror2/rules.py index b4d5fe68b82e..2e6b018f42fb 100644 --- a/worlds/ror2/rules.py +++ b/worlds/ror2/rules.py @@ -15,6 +15,13 @@ def has_entrance_access_rule(multiworld: MultiWorld, stage: str, region: str, pl entrance.access_rule = rule +def has_stage_access_rule(multiworld: MultiWorld, stage: str, amount: int, region: str, player: int) -> None: + rule = lambda state: state.has(region, player) and \ + (state.has(stage, player) or state.count("Progressive Stage", player) >= amount) + for entrance in multiworld.get_region(region, player).entrances: + entrance.access_rule = rule + + def has_all_items(multiworld: MultiWorld, items: Set[str], region: str, player: int) -> None: rule = lambda state: state.has_all(items, player) and state.has(region, player) for entrance in multiworld.get_region(region, player).entrances: @@ -43,15 +50,6 @@ def check_location(state, environment: str, player: int, item_number: int, item_ return state.can_reach(f"{environment}: {item_name} {item_number - 1}", "Location", player) -# unlock event to next set of stages -def get_stage_event(multiworld: MultiWorld, player: int, stage_number: int) -> None: - if stage_number == 4: - return - rule = lambda state: state.has(f"Stage {stage_number + 1}", player) - for entrance in multiworld.get_region(f"OrderedStage_{stage_number + 1}", player).entrances: - entrance.access_rule = rule - - def set_rules(ror2_world: "RiskOfRainWorld") -> None: player = ror2_world.player multiworld = ror2_world.multiworld @@ -124,8 +122,7 @@ def set_rules(ror2_world: "RiskOfRainWorld") -> None: for newt in range(1, newts + 1): has_location_access_rule(multiworld, environment_name, player, newt, "Newt Altar") if i > 0: - has_entrance_access_rule(multiworld, f"Stage {i}", environment_name, player) - get_stage_event(multiworld, player, i) + has_stage_access_rule(multiworld, f"Stage {i}", i, environment_name, player) if ror2_options.dlc_sotv: for i in range(len(environment_sotv_orderedstages_table)): @@ -143,10 +140,10 @@ def set_rules(ror2_world: "RiskOfRainWorld") -> None: for newt in range(1, newts + 1): has_location_access_rule(multiworld, environment_name, player, newt, "Newt Altar") if i > 0: - has_entrance_access_rule(multiworld, f"Stage {i}", environment_name, player) + has_stage_access_rule(multiworld, f"Stage {i}", i, environment_name, player) has_entrance_access_rule(multiworld, "Hidden Realm: A Moment, Fractured", "Hidden Realm: A Moment, Whole", player) - has_entrance_access_rule(multiworld, "Stage 1", "Hidden Realm: Bazaar Between Time", player) + has_stage_access_rule(multiworld, "Stage 1", 1, "Hidden Realm: Bazaar Between Time", player) has_entrance_access_rule(multiworld, "Hidden Realm: Bazaar Between Time", "Void Fields", player) has_entrance_access_rule(multiworld, "Stage 5", "Commencement", player) has_entrance_access_rule(multiworld, "Stage 5", "Hidden Realm: A Moment, Fractured", player) diff --git a/worlds/ror2/test/test_mithrix_goal.py b/worlds/ror2/test/test_mithrix_goal.py index 03b82311783c..a52301bef5eb 100644 --- a/worlds/ror2/test/test_mithrix_goal.py +++ b/worlds/ror2/test/test_mithrix_goal.py @@ -3,7 +3,9 @@ class MithrixGoalTest(RoR2TestBase): options = { - "victory": "mithrix" + "victory": "mithrix", + "require_stages": "true", + "progressive_stages": "false" } def test_mithrix(self) -> None: From 0ba6d90bb8d392e4529521aedc69888409c90537 Mon Sep 17 00:00:00 2001 From: Exempt-Medic <60412657+Exempt-Medic@users.noreply.github.com> Date: Wed, 10 Apr 2024 00:05:02 -0400 Subject: [PATCH 009/153] Fix typo (#3094) --- worlds/yoshisisland/__init__.py | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/worlds/yoshisisland/__init__.py b/worlds/yoshisisland/__init__.py index b5d7e137b5f3..f1aba3018bdb 100644 --- a/worlds/yoshisisland/__init__.py +++ b/worlds/yoshisisland/__init__.py @@ -32,8 +32,7 @@ class YoshisIslandWeb(WebWorld): setup_en = Tutorial( "Multiworld Setup Guide", - "A guide to setting up the Yoshi's Island randomizer" - "and connecting to an Archipelago server.", + "A guide to setting up the Yoshi's Island randomizer and connecting to an Archipelago server.", "English", "setup_en.md", "setup/en", From 5d4ed0045206c7338b728992b06844bef0e22b9c Mon Sep 17 00:00:00 2001 From: Aaron Wagener Date: Wed, 10 Apr 2024 22:05:52 -0500 Subject: [PATCH 010/153] Webhost: add file downloads to the room api endpoint (#2780) --- WebHostLib/api/__init__.py | 23 +++++++++++++++++++++-- WebHostLib/templates/macros.html | 3 --- 2 files changed, 21 insertions(+), 5 deletions(-) diff --git a/WebHostLib/api/__init__.py b/WebHostLib/api/__init__.py index 102c3a49f6aa..cfdbe25ff2fe 100644 --- a/WebHostLib/api/__init__.py +++ b/WebHostLib/api/__init__.py @@ -2,8 +2,9 @@ from typing import List, Tuple from uuid import UUID -from flask import Blueprint, abort +from flask import Blueprint, abort, url_for +import worlds.Files from .. import cache from ..models import Room, Seed @@ -21,12 +22,30 @@ def room_info(room: UUID): room = Room.get(id=room) if room is None: return abort(404) + + def supports_apdeltapatch(game: str): + return game in worlds.Files.AutoPatchRegister.patch_types + downloads = [] + for slot in sorted(room.seed.slots): + if slot.data and not supports_apdeltapatch(slot.game): + slot_download = { + "slot": slot.player_id, + "download": url_for("download_slot_file", room_id=room.id, player_id=slot.player_id) + } + downloads.append(slot_download) + elif slot.data: + slot_download = { + "slot": slot.player_id, + "download": url_for("download_patch", patch_id=slot.id, room_id=room.id) + } + downloads.append(slot_download) return { "tracker": room.tracker, "players": get_players(room.seed), "last_port": room.last_port, "last_activity": room.last_activity, - "timeout": room.timeout + "timeout": room.timeout, + "downloads": downloads, } diff --git a/WebHostLib/templates/macros.html b/WebHostLib/templates/macros.html index 9cb48009a427..7bbb894de090 100644 --- a/WebHostLib/templates/macros.html +++ b/WebHostLib/templates/macros.html @@ -47,9 +47,6 @@ {% elif patch.game | supports_apdeltapatch %} Download Patch File... - {% elif patch.game == "Dark Souls III" %} - - Download JSON File... {% elif patch.game == "Final Fantasy Mystic Quest" %} Download APMQ File... From 401a6d9a42d589fc6e3927f82661f3b11cb72dad Mon Sep 17 00:00:00 2001 From: NewSoupVi <57900059+NewSoupVi@users.noreply.github.com> Date: Fri, 12 Apr 2024 00:27:42 +0200 Subject: [PATCH 011/153] The Witness: The big dumb refactor (#3007) --- worlds/witness/__init__.py | 166 +++--- worlds/witness/{ => data}/WitnessItems.txt | 0 worlds/witness/{ => data}/WitnessLogic.txt | 0 .../witness/{ => data}/WitnessLogicExpert.txt | 0 .../{ => data}/WitnessLogicVanilla.txt | 0 worlds/witness/data/__init__.py | 0 .../witness/data/item_definition_classes.py | 59 ++ .../{ => data}/settings/Audio_Logs.txt | 0 .../{ => data}/settings/Door_Shuffle/Boat.txt | 0 .../Complex_Additional_Panels.txt | 0 .../Door_Shuffle/Complex_Door_Panels.txt | 0 .../settings/Door_Shuffle/Complex_Doors.txt | 0 .../Door_Shuffle/Elevators_Come_To_You.txt | 0 .../settings/Door_Shuffle/Obelisk_Keys.txt | 0 .../Door_Shuffle/Simple_Additional_Panels.txt | 0 .../settings/Door_Shuffle/Simple_Doors.txt | 0 .../settings/Door_Shuffle/Simple_Panels.txt | 0 .../{ => data}/settings/EP_Shuffle/EP_All.txt | 0 .../settings/EP_Shuffle/EP_Easy.txt | 0 .../settings/EP_Shuffle/EP_NoEclipse.txt | 0 .../settings/EP_Shuffle/EP_Sides.txt | 0 .../{ => data}/settings/Early_Caves.txt | 0 .../{ => data}/settings/Early_Caves_Start.txt | 0 .../Exclusions/Disable_Unrandomized.txt | 0 .../settings/Exclusions/Discards.txt | 0 .../{ => data}/settings/Exclusions/Vaults.txt | 0 .../{ => data}/settings/Laser_Shuffle.txt | 0 .../settings/Postgame/Beyond_Challenge.txt | 0 .../Postgame/Bottom_Floor_Discard.txt | 0 .../Bottom_Floor_Discard_NonDoors.txt | 0 .../{ => data}/settings/Postgame/Caves.txt | 0 .../settings/Postgame/Challenge_Vault_Box.txt | 0 .../settings/Postgame/Mountain_Lower.txt | 0 .../settings/Postgame/Mountain_Upper.txt | 0 .../settings/Postgame/Path_To_Challenge.txt | 0 .../{ => data}/settings/Symbol_Shuffle.txt | 0 worlds/witness/data/static_items.py | 56 ++ worlds/witness/data/static_locations.py | 482 ++++++++++++++++ worlds/witness/{ => data}/static_logic.py | 215 +++---- worlds/witness/{ => data}/utils.py | 22 +- worlds/witness/hints.py | 55 +- worlds/witness/locations.py | 528 +----------------- worlds/witness/options.py | 13 +- worlds/witness/{items.py => player_items.py} | 118 ++-- worlds/witness/player_logic.py | 204 +++---- worlds/witness/regions.py | 40 +- worlds/witness/ruff.toml | 11 + worlds/witness/rules.py | 112 ++-- 48 files changed, 1060 insertions(+), 1021 deletions(-) rename worlds/witness/{ => data}/WitnessItems.txt (100%) rename worlds/witness/{ => data}/WitnessLogic.txt (100%) rename worlds/witness/{ => data}/WitnessLogicExpert.txt (100%) rename worlds/witness/{ => data}/WitnessLogicVanilla.txt (100%) create mode 100644 worlds/witness/data/__init__.py create mode 100644 worlds/witness/data/item_definition_classes.py rename worlds/witness/{ => data}/settings/Audio_Logs.txt (100%) rename worlds/witness/{ => data}/settings/Door_Shuffle/Boat.txt (100%) rename worlds/witness/{ => data}/settings/Door_Shuffle/Complex_Additional_Panels.txt (100%) rename worlds/witness/{ => data}/settings/Door_Shuffle/Complex_Door_Panels.txt (100%) rename worlds/witness/{ => data}/settings/Door_Shuffle/Complex_Doors.txt (100%) rename worlds/witness/{ => data}/settings/Door_Shuffle/Elevators_Come_To_You.txt (100%) rename worlds/witness/{ => data}/settings/Door_Shuffle/Obelisk_Keys.txt (100%) rename worlds/witness/{ => data}/settings/Door_Shuffle/Simple_Additional_Panels.txt (100%) rename worlds/witness/{ => data}/settings/Door_Shuffle/Simple_Doors.txt (100%) rename worlds/witness/{ => data}/settings/Door_Shuffle/Simple_Panels.txt (100%) rename worlds/witness/{ => data}/settings/EP_Shuffle/EP_All.txt (100%) rename worlds/witness/{ => data}/settings/EP_Shuffle/EP_Easy.txt (100%) rename worlds/witness/{ => data}/settings/EP_Shuffle/EP_NoEclipse.txt (100%) rename worlds/witness/{ => data}/settings/EP_Shuffle/EP_Sides.txt (100%) rename worlds/witness/{ => data}/settings/Early_Caves.txt (100%) rename worlds/witness/{ => data}/settings/Early_Caves_Start.txt (100%) rename worlds/witness/{ => data}/settings/Exclusions/Disable_Unrandomized.txt (100%) rename worlds/witness/{ => data}/settings/Exclusions/Discards.txt (100%) rename worlds/witness/{ => data}/settings/Exclusions/Vaults.txt (100%) rename worlds/witness/{ => data}/settings/Laser_Shuffle.txt (100%) rename worlds/witness/{ => data}/settings/Postgame/Beyond_Challenge.txt (100%) rename worlds/witness/{ => data}/settings/Postgame/Bottom_Floor_Discard.txt (100%) rename worlds/witness/{ => data}/settings/Postgame/Bottom_Floor_Discard_NonDoors.txt (100%) rename worlds/witness/{ => data}/settings/Postgame/Caves.txt (100%) rename worlds/witness/{ => data}/settings/Postgame/Challenge_Vault_Box.txt (100%) rename worlds/witness/{ => data}/settings/Postgame/Mountain_Lower.txt (100%) rename worlds/witness/{ => data}/settings/Postgame/Mountain_Upper.txt (100%) rename worlds/witness/{ => data}/settings/Postgame/Path_To_Challenge.txt (100%) rename worlds/witness/{ => data}/settings/Symbol_Shuffle.txt (100%) create mode 100644 worlds/witness/data/static_items.py create mode 100644 worlds/witness/data/static_locations.py rename worlds/witness/{ => data}/static_logic.py (51%) rename worlds/witness/{ => data}/utils.py (93%) rename worlds/witness/{items.py => player_items.py} (66%) create mode 100644 worlds/witness/ruff.toml diff --git a/worlds/witness/__init__.py b/worlds/witness/__init__.py index 88de0f3134f2..a506cc074cd7 100644 --- a/worlds/witness/__init__.py +++ b/worlds/witness/__init__.py @@ -2,24 +2,26 @@ Archipelago init file for The Witness """ import dataclasses +from logging import error, warning +from typing import Any, Dict, List, Optional, cast + +from BaseClasses import CollectionState, Entrance, Location, Region, Tutorial -from typing import Dict, Optional, cast -from BaseClasses import Region, Location, MultiWorld, Item, Entrance, Tutorial, CollectionState from Options import PerGameCommonOptions, Toggle -from .presets import witness_option_presets -from worlds.AutoWorld import World, WebWorld +from worlds.AutoWorld import WebWorld, World + +from .data import static_items as static_witness_items +from .data import static_logic as static_witness_logic +from .data.item_definition_classes import DoorItemDefinition, ItemData +from .data.utils import get_audio_logs +from .hints import CompactItemData, create_all_hints, generate_joke_hints, make_compact_hint_data, make_laser_hints +from .locations import WitnessPlayerLocations, static_witness_locations +from .options import TheWitnessOptions +from .player_items import WitnessItem, WitnessPlayerItems from .player_logic import WitnessPlayerLogic -from .static_logic import StaticWitnessLogic, ItemCategory, DoorItemDefinition -from .hints import get_always_hint_locations, get_always_hint_items, get_priority_hint_locations, \ - get_priority_hint_items, make_always_and_priority_hints, generate_joke_hints, make_area_hints, get_hintable_areas, \ - make_extra_location_hints, create_all_hints, make_laser_hints, make_compact_hint_data, CompactItemData -from .locations import WitnessPlayerLocations, StaticWitnessLocations -from .items import WitnessItem, StaticWitnessItems, WitnessPlayerItems, ItemData -from .regions import WitnessRegions +from .presets import witness_option_presets +from .regions import WitnessPlayerRegions from .rules import set_rules -from .options import TheWitnessOptions -from .utils import get_audio_logs, get_laser_shuffle -from logging import warning, error class WitnessWebWorld(WebWorld): @@ -50,46 +52,43 @@ class WitnessWorld(World): options: TheWitnessOptions item_name_to_id = { - name: data.ap_code for name, data in StaticWitnessItems.item_data.items() + name: data.ap_code for name, data in static_witness_items.ITEM_DATA.items() } - location_name_to_id = StaticWitnessLocations.ALL_LOCATIONS_TO_ID - item_name_groups = StaticWitnessItems.item_groups - location_name_groups = StaticWitnessLocations.AREA_LOCATION_GROUPS + location_name_to_id = static_witness_locations.ALL_LOCATIONS_TO_ID + item_name_groups = static_witness_items.ITEM_GROUPS + location_name_groups = static_witness_locations.AREA_LOCATION_GROUPS required_client_version = (0, 4, 5) - def __init__(self, multiworld: "MultiWorld", player: int): - super().__init__(multiworld, player) + player_logic: WitnessPlayerLogic + player_locations: WitnessPlayerLocations + player_items: WitnessPlayerItems + player_regions: WitnessPlayerRegions - self.player_logic = None - self.locat = None - self.items = None - self.regio = None + log_ids_to_hints: Dict[int, CompactItemData] + laser_ids_to_hints: Dict[int, CompactItemData] - self.log_ids_to_hints: Dict[int, CompactItemData] = dict() - self.laser_ids_to_hints: Dict[int, CompactItemData] = dict() - - self.items_placed_early = [] - self.own_itempool = [] + items_placed_early: List[str] + own_itempool: List[WitnessItem] - def _get_slot_data(self): + def _get_slot_data(self) -> Dict[str, Any]: return { - 'seed': self.random.randrange(0, 1000000), - 'victory_location': int(self.player_logic.VICTORY_LOCATION, 16), - 'panelhex_to_id': self.locat.CHECK_PANELHEX_TO_ID, - 'item_id_to_door_hexes': StaticWitnessItems.get_item_to_door_mappings(), - 'door_hexes_in_the_pool': self.items.get_door_ids_in_pool(), - 'symbols_not_in_the_game': self.items.get_symbol_ids_not_in_pool(), - 'disabled_entities': [int(h, 16) for h in self.player_logic.COMPLETELY_DISABLED_ENTITIES], - 'log_ids_to_hints': self.log_ids_to_hints, - 'laser_ids_to_hints': self.laser_ids_to_hints, - 'progressive_item_lists': self.items.get_progressive_item_ids_in_pool(), - 'obelisk_side_id_to_EPs': StaticWitnessLogic.OBELISK_SIDE_ID_TO_EP_HEXES, - 'precompleted_puzzles': [int(h, 16) for h in self.player_logic.EXCLUDED_LOCATIONS], - 'entity_to_name': StaticWitnessLogic.ENTITY_ID_TO_NAME, + "seed": self.random.randrange(0, 1000000), + "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(), + "door_hexes_in_the_pool": self.player_items.get_door_ids_in_pool(), + "symbols_not_in_the_game": self.player_items.get_symbol_ids_not_in_pool(), + "disabled_entities": [int(h, 16) for h in self.player_logic.COMPLETELY_DISABLED_ENTITIES], + "log_ids_to_hints": self.log_ids_to_hints, + "laser_ids_to_hints": self.laser_ids_to_hints, + "progressive_item_lists": self.player_items.get_progressive_item_ids_in_pool(), + "obelisk_side_id_to_EPs": static_witness_logic.OBELISK_SIDE_ID_TO_EP_HEXES, + "precompleted_puzzles": [int(h, 16) for h in self.player_logic.EXCLUDED_LOCATIONS], + "entity_to_name": static_witness_logic.ENTITY_ID_TO_NAME, } - def determine_sufficient_progression(self): + def determine_sufficient_progression(self) -> None: """ Determine whether there are enough progression items in this world to consider it "interactive". In the case of singleplayer, this just outputs a warning. @@ -127,20 +126,20 @@ def determine_sufficient_progression(self): elif not interacts_sufficiently_with_multiworld and self.multiworld.players > 1: raise Exception(f"{self.multiworld.get_player_name(self.player)}'s Witness world doesn't have enough" f" progression items that can be placed in other players' worlds. Please turn on Symbol" - f" Shuffle, Door Shuffle or Obelisk Keys.") + f" Shuffle, Door Shuffle, or Obelisk Keys.") - def generate_early(self): + def generate_early(self) -> None: disabled_locations = self.options.exclude_locations.value self.player_logic = WitnessPlayerLogic( self, disabled_locations, self.options.start_inventory.value ) - self.locat: WitnessPlayerLocations = WitnessPlayerLocations(self, self.player_logic) - self.items: WitnessPlayerItems = WitnessPlayerItems( - self, self.player_logic, self.locat + self.player_locations: WitnessPlayerLocations = WitnessPlayerLocations(self, self.player_logic) + self.player_items: WitnessPlayerItems = WitnessPlayerItems( + self, self.player_logic, self.player_locations ) - self.regio: WitnessRegions = WitnessRegions(self.locat, self) + self.player_regions: WitnessPlayerRegions = WitnessPlayerRegions(self.player_locations, self) self.log_ids_to_hints = dict() @@ -149,22 +148,27 @@ def generate_early(self): if self.options.shuffle_lasers == "local": self.options.local_items.value |= self.item_name_groups["Lasers"] - def create_regions(self): - self.regio.create_regions(self, self.player_logic) + def create_regions(self) -> None: + self.player_regions.create_regions(self, self.player_logic) # Set rules early so extra locations can be created based on the results of exploring collection states set_rules(self) + # Start creating items + + self.items_placed_early = [] + self.own_itempool = [] + # Add event items and tie them to event locations (e.g. laser activations). event_locations = [] - for event_location in self.locat.EVENT_LOCATION_TABLE: + for event_location in self.player_locations.EVENT_LOCATION_TABLE: item_obj = self.create_item( self.player_logic.EVENT_ITEM_PAIRS[event_location] ) - location_obj = self.multiworld.get_location(event_location, self.player) + location_obj = self.get_location(event_location) location_obj.place_locked_item(item_obj) self.own_itempool.append(item_obj) @@ -172,14 +176,16 @@ def create_regions(self): # Place other locked items dog_puzzle_skip = self.create_item("Puzzle Skip") - self.multiworld.get_location("Town Pet the Dog", self.player).place_locked_item(dog_puzzle_skip) + self.get_location("Town Pet the Dog").place_locked_item(dog_puzzle_skip) self.own_itempool.append(dog_puzzle_skip) self.items_placed_early.append("Puzzle Skip") # Pick an early item to place on the tutorial gate. - early_items = [item for item in self.items.get_early_items() if item in self.items.get_mandatory_items()] + early_items = [ + item for item in self.player_items.get_early_items() if item in self.player_items.get_mandatory_items() + ] if early_items: random_early_item = self.random.choice(early_items) if self.options.puzzle_randomization == "sigma_expert": @@ -188,7 +194,7 @@ def create_regions(self): else: # Force the item onto the tutorial gate check and remove it from our random pool. gate_item = self.create_item(random_early_item) - self.multiworld.get_location("Tutorial Gate Open", self.player).place_locked_item(gate_item) + self.get_location("Tutorial Gate Open").place_locked_item(gate_item) self.own_itempool.append(gate_item) self.items_placed_early.append(random_early_item) @@ -223,19 +229,19 @@ def create_regions(self): break region, loc = extra_checks.pop(0) - self.locat.add_location_late(loc) - self.multiworld.get_region(region, self.player).add_locations({loc: self.location_name_to_id[loc]}) + self.player_locations.add_location_late(loc) + self.get_region(region).add_locations({loc: self.location_name_to_id[loc]}) player = self.multiworld.get_player_name(self.player) - + warning(f"""Location "{loc}" had to be added to {player}'s world due to insufficient sphere 1 size.""") - def create_items(self): + def create_items(self) -> None: # Determine pool size. - pool_size: int = len(self.locat.CHECK_LOCATION_TABLE) - len(self.locat.EVENT_LOCATION_TABLE) + pool_size = len(self.player_locations.CHECK_LOCATION_TABLE) - len(self.player_locations.EVENT_LOCATION_TABLE) # Fill mandatory items and remove precollected and/or starting items from the pool. - item_pool: Dict[str, int] = self.items.get_mandatory_items() + item_pool = self.player_items.get_mandatory_items() # Remove one copy of each item that was placed early for already_placed in self.items_placed_early: @@ -283,7 +289,7 @@ def create_items(self): # Add junk items. if remaining_item_slots > 0: - item_pool.update(self.items.get_filler_items(remaining_item_slots)) + item_pool.update(self.player_items.get_filler_items(remaining_item_slots)) # Generate the actual items. for item_name, quantity in sorted(item_pool.items()): @@ -291,19 +297,22 @@ def create_items(self): self.own_itempool += new_items self.multiworld.itempool += new_items - if self.items.item_data[item_name].local_only: + if self.player_items.item_data[item_name].local_only: self.options.local_items.value.add(item_name) def fill_slot_data(self) -> dict: + self.log_ids_to_hints: Dict[int, CompactItemData] = dict() + self.laser_ids_to_hints: Dict[int, CompactItemData] = dict() + already_hinted_locations = set() # Laser hints if self.options.laser_hints: - laser_hints = make_laser_hints(self, StaticWitnessItems.item_groups["Lasers"]) + laser_hints = make_laser_hints(self, static_witness_items.ITEM_GROUPS["Lasers"]) for item_name, hint in laser_hints.items(): - item_def = cast(DoorItemDefinition, StaticWitnessLogic.all_items[item_name]) + item_def = cast(DoorItemDefinition, static_witness_logic.ALL_ITEMS[item_name]) self.laser_ids_to_hints[int(item_def.panel_id_hexes[0], 16)] = make_compact_hint_data(hint, self.player) already_hinted_locations.add(hint.location) @@ -356,18 +365,18 @@ def fill_slot_data(self) -> dict: return slot_data - def create_item(self, item_name: str) -> Item: + def create_item(self, item_name: str) -> WitnessItem: # If the player's plando options are malformed, the item_name parameter could be a dictionary containing the # name of the item, rather than the item itself. This is a workaround to prevent a crash. - if type(item_name) is dict: - item_name = list(item_name.keys())[0] + if isinstance(item_name, dict): + item_name = next(iter(item_name)) # this conditional is purely for unit tests, which need to be able to create an item before generate_early item_data: ItemData - if hasattr(self, 'items') and self.items and item_name in self.items.item_data: - item_data = self.items.item_data[item_name] + if hasattr(self, "player_items") and self.player_items and item_name in self.player_items.item_data: + item_data = self.player_items.item_data[item_name] else: - item_data = StaticWitnessItems.item_data[item_name] + item_data = static_witness_items.ITEM_DATA[item_name] return WitnessItem(item_name, item_data.classification, item_data.ap_code, player=self.player) @@ -382,12 +391,13 @@ class WitnessLocation(Location): game: str = "The Witness" entity_hex: int = -1 - def __init__(self, player: int, name: str, address: Optional[int], parent, ch_hex: int = -1): + def __init__(self, player: int, name: str, address: Optional[int], parent, ch_hex: int = -1) -> None: super().__init__(player, name, address, parent) self.entity_hex = ch_hex -def create_region(world: WitnessWorld, name: str, locat: WitnessPlayerLocations, region_locations=None, exits=None): +def create_region(world: WitnessWorld, name: str, player_locations: WitnessPlayerLocations, + region_locations=None, exits=None) -> Region: """ Create an Archipelago Region for The Witness """ @@ -395,12 +405,12 @@ def create_region(world: WitnessWorld, name: str, locat: WitnessPlayerLocations, ret = Region(name, world.player, world.multiworld) if region_locations: for location in region_locations: - loc_id = locat.CHECK_LOCATION_TABLE[location] + loc_id = player_locations.CHECK_LOCATION_TABLE[location] entity_hex = -1 - if location in StaticWitnessLogic.ENTITIES_BY_NAME: + if location in static_witness_logic.ENTITIES_BY_NAME: entity_hex = int( - StaticWitnessLogic.ENTITIES_BY_NAME[location]["entity_hex"], 0 + static_witness_logic.ENTITIES_BY_NAME[location]["entity_hex"], 0 ) location = WitnessLocation( world.player, location, loc_id, ret, entity_hex diff --git a/worlds/witness/WitnessItems.txt b/worlds/witness/data/WitnessItems.txt similarity index 100% rename from worlds/witness/WitnessItems.txt rename to worlds/witness/data/WitnessItems.txt diff --git a/worlds/witness/WitnessLogic.txt b/worlds/witness/data/WitnessLogic.txt similarity index 100% rename from worlds/witness/WitnessLogic.txt rename to worlds/witness/data/WitnessLogic.txt diff --git a/worlds/witness/WitnessLogicExpert.txt b/worlds/witness/data/WitnessLogicExpert.txt similarity index 100% rename from worlds/witness/WitnessLogicExpert.txt rename to worlds/witness/data/WitnessLogicExpert.txt diff --git a/worlds/witness/WitnessLogicVanilla.txt b/worlds/witness/data/WitnessLogicVanilla.txt similarity index 100% rename from worlds/witness/WitnessLogicVanilla.txt rename to worlds/witness/data/WitnessLogicVanilla.txt diff --git a/worlds/witness/data/__init__.py b/worlds/witness/data/__init__.py new file mode 100644 index 000000000000..e69de29bb2d1 diff --git a/worlds/witness/data/item_definition_classes.py b/worlds/witness/data/item_definition_classes.py new file mode 100644 index 000000000000..b095a83abe63 --- /dev/null +++ b/worlds/witness/data/item_definition_classes.py @@ -0,0 +1,59 @@ +from dataclasses import dataclass +from enum import Enum +from typing import Dict, List, Optional + +from BaseClasses import ItemClassification + + +class ItemCategory(Enum): + SYMBOL = 0 + DOOR = 1 + LASER = 2 + USEFUL = 3 + FILLER = 4 + TRAP = 5 + JOKE = 6 + EVENT = 7 + + +CATEGORY_NAME_MAPPINGS: Dict[str, ItemCategory] = { + "Symbols:": ItemCategory.SYMBOL, + "Doors:": ItemCategory.DOOR, + "Lasers:": ItemCategory.LASER, + "Useful:": ItemCategory.USEFUL, + "Filler:": ItemCategory.FILLER, + "Traps:": ItemCategory.TRAP, + "Jokes:": ItemCategory.JOKE +} + + +@dataclass(frozen=True) +class ItemDefinition: + local_code: int + category: ItemCategory + + +@dataclass(frozen=True) +class ProgressiveItemDefinition(ItemDefinition): + child_item_names: List[str] + + +@dataclass(frozen=True) +class DoorItemDefinition(ItemDefinition): + panel_id_hexes: List[str] + + +@dataclass(frozen=True) +class WeightedItemDefinition(ItemDefinition): + weight: int + + +@dataclass() +class ItemData: + """ + ItemData for an item in The Witness + """ + ap_code: Optional[int] + definition: ItemDefinition + classification: ItemClassification + local_only: bool = False diff --git a/worlds/witness/settings/Audio_Logs.txt b/worlds/witness/data/settings/Audio_Logs.txt similarity index 100% rename from worlds/witness/settings/Audio_Logs.txt rename to worlds/witness/data/settings/Audio_Logs.txt diff --git a/worlds/witness/settings/Door_Shuffle/Boat.txt b/worlds/witness/data/settings/Door_Shuffle/Boat.txt similarity index 100% rename from worlds/witness/settings/Door_Shuffle/Boat.txt rename to worlds/witness/data/settings/Door_Shuffle/Boat.txt diff --git a/worlds/witness/settings/Door_Shuffle/Complex_Additional_Panels.txt b/worlds/witness/data/settings/Door_Shuffle/Complex_Additional_Panels.txt similarity index 100% rename from worlds/witness/settings/Door_Shuffle/Complex_Additional_Panels.txt rename to worlds/witness/data/settings/Door_Shuffle/Complex_Additional_Panels.txt diff --git a/worlds/witness/settings/Door_Shuffle/Complex_Door_Panels.txt b/worlds/witness/data/settings/Door_Shuffle/Complex_Door_Panels.txt similarity index 100% rename from worlds/witness/settings/Door_Shuffle/Complex_Door_Panels.txt rename to worlds/witness/data/settings/Door_Shuffle/Complex_Door_Panels.txt diff --git a/worlds/witness/settings/Door_Shuffle/Complex_Doors.txt b/worlds/witness/data/settings/Door_Shuffle/Complex_Doors.txt similarity index 100% rename from worlds/witness/settings/Door_Shuffle/Complex_Doors.txt rename to worlds/witness/data/settings/Door_Shuffle/Complex_Doors.txt diff --git a/worlds/witness/settings/Door_Shuffle/Elevators_Come_To_You.txt b/worlds/witness/data/settings/Door_Shuffle/Elevators_Come_To_You.txt similarity index 100% rename from worlds/witness/settings/Door_Shuffle/Elevators_Come_To_You.txt rename to worlds/witness/data/settings/Door_Shuffle/Elevators_Come_To_You.txt diff --git a/worlds/witness/settings/Door_Shuffle/Obelisk_Keys.txt b/worlds/witness/data/settings/Door_Shuffle/Obelisk_Keys.txt similarity index 100% rename from worlds/witness/settings/Door_Shuffle/Obelisk_Keys.txt rename to worlds/witness/data/settings/Door_Shuffle/Obelisk_Keys.txt diff --git a/worlds/witness/settings/Door_Shuffle/Simple_Additional_Panels.txt b/worlds/witness/data/settings/Door_Shuffle/Simple_Additional_Panels.txt similarity index 100% rename from worlds/witness/settings/Door_Shuffle/Simple_Additional_Panels.txt rename to worlds/witness/data/settings/Door_Shuffle/Simple_Additional_Panels.txt diff --git a/worlds/witness/settings/Door_Shuffle/Simple_Doors.txt b/worlds/witness/data/settings/Door_Shuffle/Simple_Doors.txt similarity index 100% rename from worlds/witness/settings/Door_Shuffle/Simple_Doors.txt rename to worlds/witness/data/settings/Door_Shuffle/Simple_Doors.txt diff --git a/worlds/witness/settings/Door_Shuffle/Simple_Panels.txt b/worlds/witness/data/settings/Door_Shuffle/Simple_Panels.txt similarity index 100% rename from worlds/witness/settings/Door_Shuffle/Simple_Panels.txt rename to worlds/witness/data/settings/Door_Shuffle/Simple_Panels.txt diff --git a/worlds/witness/settings/EP_Shuffle/EP_All.txt b/worlds/witness/data/settings/EP_Shuffle/EP_All.txt similarity index 100% rename from worlds/witness/settings/EP_Shuffle/EP_All.txt rename to worlds/witness/data/settings/EP_Shuffle/EP_All.txt diff --git a/worlds/witness/settings/EP_Shuffle/EP_Easy.txt b/worlds/witness/data/settings/EP_Shuffle/EP_Easy.txt similarity index 100% rename from worlds/witness/settings/EP_Shuffle/EP_Easy.txt rename to worlds/witness/data/settings/EP_Shuffle/EP_Easy.txt diff --git a/worlds/witness/settings/EP_Shuffle/EP_NoEclipse.txt b/worlds/witness/data/settings/EP_Shuffle/EP_NoEclipse.txt similarity index 100% rename from worlds/witness/settings/EP_Shuffle/EP_NoEclipse.txt rename to worlds/witness/data/settings/EP_Shuffle/EP_NoEclipse.txt diff --git a/worlds/witness/settings/EP_Shuffle/EP_Sides.txt b/worlds/witness/data/settings/EP_Shuffle/EP_Sides.txt similarity index 100% rename from worlds/witness/settings/EP_Shuffle/EP_Sides.txt rename to worlds/witness/data/settings/EP_Shuffle/EP_Sides.txt diff --git a/worlds/witness/settings/Early_Caves.txt b/worlds/witness/data/settings/Early_Caves.txt similarity index 100% rename from worlds/witness/settings/Early_Caves.txt rename to worlds/witness/data/settings/Early_Caves.txt diff --git a/worlds/witness/settings/Early_Caves_Start.txt b/worlds/witness/data/settings/Early_Caves_Start.txt similarity index 100% rename from worlds/witness/settings/Early_Caves_Start.txt rename to worlds/witness/data/settings/Early_Caves_Start.txt diff --git a/worlds/witness/settings/Exclusions/Disable_Unrandomized.txt b/worlds/witness/data/settings/Exclusions/Disable_Unrandomized.txt similarity index 100% rename from worlds/witness/settings/Exclusions/Disable_Unrandomized.txt rename to worlds/witness/data/settings/Exclusions/Disable_Unrandomized.txt diff --git a/worlds/witness/settings/Exclusions/Discards.txt b/worlds/witness/data/settings/Exclusions/Discards.txt similarity index 100% rename from worlds/witness/settings/Exclusions/Discards.txt rename to worlds/witness/data/settings/Exclusions/Discards.txt diff --git a/worlds/witness/settings/Exclusions/Vaults.txt b/worlds/witness/data/settings/Exclusions/Vaults.txt similarity index 100% rename from worlds/witness/settings/Exclusions/Vaults.txt rename to worlds/witness/data/settings/Exclusions/Vaults.txt diff --git a/worlds/witness/settings/Laser_Shuffle.txt b/worlds/witness/data/settings/Laser_Shuffle.txt similarity index 100% rename from worlds/witness/settings/Laser_Shuffle.txt rename to worlds/witness/data/settings/Laser_Shuffle.txt diff --git a/worlds/witness/settings/Postgame/Beyond_Challenge.txt b/worlds/witness/data/settings/Postgame/Beyond_Challenge.txt similarity index 100% rename from worlds/witness/settings/Postgame/Beyond_Challenge.txt rename to worlds/witness/data/settings/Postgame/Beyond_Challenge.txt diff --git a/worlds/witness/settings/Postgame/Bottom_Floor_Discard.txt b/worlds/witness/data/settings/Postgame/Bottom_Floor_Discard.txt similarity index 100% rename from worlds/witness/settings/Postgame/Bottom_Floor_Discard.txt rename to worlds/witness/data/settings/Postgame/Bottom_Floor_Discard.txt diff --git a/worlds/witness/settings/Postgame/Bottom_Floor_Discard_NonDoors.txt b/worlds/witness/data/settings/Postgame/Bottom_Floor_Discard_NonDoors.txt similarity index 100% rename from worlds/witness/settings/Postgame/Bottom_Floor_Discard_NonDoors.txt rename to worlds/witness/data/settings/Postgame/Bottom_Floor_Discard_NonDoors.txt diff --git a/worlds/witness/settings/Postgame/Caves.txt b/worlds/witness/data/settings/Postgame/Caves.txt similarity index 100% rename from worlds/witness/settings/Postgame/Caves.txt rename to worlds/witness/data/settings/Postgame/Caves.txt diff --git a/worlds/witness/settings/Postgame/Challenge_Vault_Box.txt b/worlds/witness/data/settings/Postgame/Challenge_Vault_Box.txt similarity index 100% rename from worlds/witness/settings/Postgame/Challenge_Vault_Box.txt rename to worlds/witness/data/settings/Postgame/Challenge_Vault_Box.txt diff --git a/worlds/witness/settings/Postgame/Mountain_Lower.txt b/worlds/witness/data/settings/Postgame/Mountain_Lower.txt similarity index 100% rename from worlds/witness/settings/Postgame/Mountain_Lower.txt rename to worlds/witness/data/settings/Postgame/Mountain_Lower.txt diff --git a/worlds/witness/settings/Postgame/Mountain_Upper.txt b/worlds/witness/data/settings/Postgame/Mountain_Upper.txt similarity index 100% rename from worlds/witness/settings/Postgame/Mountain_Upper.txt rename to worlds/witness/data/settings/Postgame/Mountain_Upper.txt diff --git a/worlds/witness/settings/Postgame/Path_To_Challenge.txt b/worlds/witness/data/settings/Postgame/Path_To_Challenge.txt similarity index 100% rename from worlds/witness/settings/Postgame/Path_To_Challenge.txt rename to worlds/witness/data/settings/Postgame/Path_To_Challenge.txt diff --git a/worlds/witness/settings/Symbol_Shuffle.txt b/worlds/witness/data/settings/Symbol_Shuffle.txt similarity index 100% rename from worlds/witness/settings/Symbol_Shuffle.txt rename to worlds/witness/data/settings/Symbol_Shuffle.txt diff --git a/worlds/witness/data/static_items.py b/worlds/witness/data/static_items.py new file mode 100644 index 000000000000..8eb889f8203a --- /dev/null +++ b/worlds/witness/data/static_items.py @@ -0,0 +1,56 @@ +from typing import Dict, List + +from BaseClasses import ItemClassification + +from . import static_logic as static_witness_logic +from .item_definition_classes import DoorItemDefinition, ItemCategory, ItemData +from .static_locations import ID_START + +ITEM_DATA: Dict[str, ItemData] = {} +ITEM_GROUPS: Dict[str, List[str]] = {} + +# Useful items that are treated specially at generation time and should not be automatically added to the player's +# item list during get_progression_items. +_special_usefuls: List[str] = ["Puzzle Skip"] + + +def populate_items() -> None: + for item_name, definition in static_witness_logic.ALL_ITEMS.items(): + ap_item_code = definition.local_code + ID_START + classification: ItemClassification = ItemClassification.filler + local_only: bool = False + + if definition.category is ItemCategory.SYMBOL: + classification = ItemClassification.progression + ITEM_GROUPS.setdefault("Symbols", []).append(item_name) + elif definition.category is ItemCategory.DOOR: + classification = ItemClassification.progression + ITEM_GROUPS.setdefault("Doors", []).append(item_name) + elif definition.category is ItemCategory.LASER: + classification = ItemClassification.progression_skip_balancing + ITEM_GROUPS.setdefault("Lasers", []).append(item_name) + elif definition.category is ItemCategory.USEFUL: + classification = ItemClassification.useful + elif definition.category is ItemCategory.FILLER: + if item_name in ["Energy Fill (Small)"]: + local_only = True + classification = ItemClassification.filler + elif definition.category is ItemCategory.TRAP: + classification = ItemClassification.trap + elif definition.category is ItemCategory.JOKE: + classification = ItemClassification.filler + + ITEM_DATA[item_name] = ItemData(ap_item_code, definition, + classification, local_only) + + +def get_item_to_door_mappings() -> Dict[int, List[int]]: + output: Dict[int, List[int]] = {} + for item_name, item_data in ITEM_DATA.items(): + if not isinstance(item_data.definition, DoorItemDefinition): + continue + output[item_data.ap_code] = [int(hex_string, 16) for hex_string in item_data.definition.panel_id_hexes] + return output + + +populate_items() diff --git a/worlds/witness/data/static_locations.py b/worlds/witness/data/static_locations.py new file mode 100644 index 000000000000..e11544235ffc --- /dev/null +++ b/worlds/witness/data/static_locations.py @@ -0,0 +1,482 @@ +from . import static_logic as static_witness_logic + +ID_START = 158000 + +GENERAL_LOCATIONS = { + "Tutorial Front Left", + "Tutorial Back Left", + "Tutorial Back Right", + "Tutorial Patio Floor", + "Tutorial Gate Open", + + "Outside Tutorial Vault Box", + "Outside Tutorial Discard", + "Outside Tutorial Shed Row 5", + "Outside Tutorial Tree Row 9", + "Outside Tutorial Outpost Entry Panel", + "Outside Tutorial Outpost Exit Panel", + + "Glass Factory Discard", + "Glass Factory Back Wall 5", + "Glass Factory Front 3", + "Glass Factory Melting 3", + + "Symmetry Island Lower Panel", + "Symmetry Island Right 5", + "Symmetry Island Back 6", + "Symmetry Island Left 7", + "Symmetry Island Upper Panel", + "Symmetry Island Scenery Outlines 5", + "Symmetry Island Laser Yellow 3", + "Symmetry Island Laser Blue 3", + "Symmetry Island Laser Panel", + + "Orchard Apple Tree 5", + + "Desert Vault Box", + "Desert Discard", + "Desert Surface 8", + "Desert Light Room 3", + "Desert Pond Room 5", + "Desert Flood Room 6", + "Desert Elevator Room Hexagonal", + "Desert Elevator Room Bent 3", + "Desert Laser Panel", + + "Quarry Entry 1 Panel", + "Quarry Entry 2 Panel", + "Quarry Stoneworks Entry Left Panel", + "Quarry Stoneworks Entry Right Panel", + "Quarry Stoneworks Lower Row 6", + "Quarry Stoneworks Upper Row 8", + "Quarry Stoneworks Control Room Left", + "Quarry Stoneworks Control Room Right", + "Quarry Stoneworks Stairs Panel", + "Quarry Boathouse Intro Right", + "Quarry Boathouse Intro Left", + "Quarry Boathouse Front Row 5", + "Quarry Boathouse Back First Row 9", + "Quarry Boathouse Back Second Row 3", + "Quarry Discard", + "Quarry Laser Panel", + + "Shadows Intro 8", + "Shadows Far 8", + "Shadows Near 5", + "Shadows Laser Panel", + + "Keep Hedge Maze 1", + "Keep Hedge Maze 2", + "Keep Hedge Maze 3", + "Keep Hedge Maze 4", + "Keep Pressure Plates 1", + "Keep Pressure Plates 2", + "Keep Pressure Plates 3", + "Keep Pressure Plates 4", + "Keep Discard", + "Keep Laser Panel Hedges", + "Keep Laser Panel Pressure Plates", + + "Shipwreck Vault Box", + "Shipwreck Discard", + + "Monastery Outside 3", + "Monastery Inside 4", + "Monastery Laser Panel", + + "Town Cargo Box Entry Panel", + "Town Cargo Box Discard", + "Town Tall Hexagonal", + "Town Church Entry Panel", + "Town Church Lattice", + "Town Maze Panel", + "Town Rooftop Discard", + "Town Red Rooftop 5", + "Town Wooden Roof Lower Row 5", + "Town Wooden Rooftop", + "Windmill Entry Panel", + "Town RGB House Entry Panel", + "Town Laser Panel", + + "Town RGB House Upstairs Left", + "Town RGB House Upstairs Right", + "Town RGB House Sound Room Right", + + "Windmill Theater Entry Panel", + "Theater Exit Left Panel", + "Theater Exit Right Panel", + "Theater Tutorial Video", + "Theater Desert Video", + "Theater Jungle Video", + "Theater Shipwreck Video", + "Theater Mountain Video", + "Theater Discard", + + "Jungle Discard", + "Jungle First Row 3", + "Jungle Second Row 4", + "Jungle Popup Wall 6", + "Jungle Laser Panel", + + "Jungle Vault Box", + "Jungle Monastery Garden Shortcut Panel", + + "Bunker Entry Panel", + "Bunker Intro Left 5", + "Bunker Intro Back 4", + "Bunker Glass Room 3", + "Bunker UV Room 2", + "Bunker Laser Panel", + + "Swamp Entry Panel", + "Swamp Intro Front 6", + "Swamp Intro Back 8", + "Swamp Between Bridges Near Row 4", + "Swamp Cyan Underwater 5", + "Swamp Platform Row 4", + "Swamp Platform Shortcut Right Panel", + "Swamp Between Bridges Far Row 4", + "Swamp Red Underwater 4", + "Swamp Purple Underwater", + "Swamp Beyond Rotating Bridge 4", + "Swamp Blue Underwater 5", + "Swamp Laser Panel", + "Swamp Laser Shortcut Right Panel", + + "Treehouse First Door Panel", + "Treehouse Second Door Panel", + "Treehouse Third Door Panel", + "Treehouse Yellow Bridge 9", + "Treehouse First Purple Bridge 5", + "Treehouse Second Purple Bridge 7", + "Treehouse Green Bridge 7", + "Treehouse Green Bridge Discard", + "Treehouse Left Orange Bridge 15", + "Treehouse Laser Discard", + "Treehouse Right Orange Bridge 12", + "Treehouse Laser Panel", + "Treehouse Drawbridge Panel", + + "Mountainside Discard", + "Mountainside Vault Box", + "Mountaintop River Shape", + + "Tutorial First Hallway EP", + "Tutorial Cloud EP", + "Tutorial Patio Flowers EP", + "Tutorial Gate EP", + "Outside Tutorial Garden EP", + "Outside Tutorial Town Sewer EP", + "Outside Tutorial Path EP", + "Outside Tutorial Tractor EP", + "Mountainside Thundercloud EP", + "Glass Factory Vase EP", + "Symmetry Island Glass Factory Black Line Reflection EP", + "Symmetry Island Glass Factory Black Line EP", + "Desert Sand Snake EP", + "Desert Facade Right EP", + "Desert Facade Left EP", + "Desert Stairs Left EP", + "Desert Stairs Right EP", + "Desert Broken Wall Straight EP", + "Desert Broken Wall Bend EP", + "Desert Shore EP", + "Desert Island EP", + "Desert Pond Room Near Reflection EP", + "Desert Pond Room Far Reflection EP", + "Desert Flood Room EP", + "Desert Elevator EP", + "Quarry Shore EP", + "Quarry Entrance Pipe EP", + "Quarry Sand Pile EP", + "Quarry Rock Line EP", + "Quarry Rock Line Reflection EP", + "Quarry Railroad EP", + "Quarry Stoneworks Ramp EP", + "Quarry Stoneworks Lift EP", + "Quarry Boathouse Moving Ramp EP", + "Quarry Boathouse Hook EP", + "Shadows Quarry Stoneworks Rooftop Vent EP", + "Treehouse Beach Rock Shadow EP", + "Treehouse Beach Sand Shadow EP", + "Treehouse Beach Both Orange Bridges EP", + "Keep Red Flowers EP", + "Keep Purple Flowers EP", + "Shipwreck Circle Near EP", + "Shipwreck Circle Left EP", + "Shipwreck Circle Far EP", + "Shipwreck Stern EP", + "Shipwreck Rope Inner EP", + "Shipwreck Rope Outer EP", + "Shipwreck Couch EP", + "Keep Pressure Plates 1 EP", + "Keep Pressure Plates 2 EP", + "Keep Pressure Plates 3 EP", + "Keep Pressure Plates 4 Left Exit EP", + "Keep Pressure Plates 4 Right Exit EP", + "Keep Path EP", + "Keep Hedges EP", + "Monastery Facade Left Near EP", + "Monastery Facade Left Far Short EP", + "Monastery Facade Left Far Long EP", + "Monastery Facade Right Near EP", + "Monastery Facade Left Stairs EP", + "Monastery Facade Right Stairs EP", + "Monastery Grass Stairs EP", + "Monastery Left Shutter EP", + "Monastery Middle Shutter EP", + "Monastery Right Shutter EP", + "Windmill First Blade EP", + "Windmill Second Blade EP", + "Windmill Third Blade EP", + "Town Tower Underside Third EP", + "Town Tower Underside Fourth EP", + "Town Tower Underside First EP", + "Town Tower Underside Second EP", + "Town RGB House Red EP", + "Town RGB House Green EP", + "Town Maze Bridge Underside EP", + "Town Black Line Redirect EP", + "Town Black Line Church EP", + "Town Brown Bridge EP", + "Town Black Line Tower EP", + "Theater Eclipse EP", + "Theater Window EP", + "Theater Door EP", + "Theater Church EP", + "Jungle Long Arch Moss EP", + "Jungle Straight Left Moss EP", + "Jungle Pop-up Wall Moss EP", + "Jungle Short Arch Moss EP", + "Jungle Entrance EP", + "Jungle Tree Halo EP", + "Jungle Bamboo CCW EP", + "Jungle Bamboo CW EP", + "Jungle Green Leaf Moss EP", + "Monastery Garden Left EP", + "Monastery Garden Right EP", + "Monastery Wall EP", + "Bunker Tinted Door EP", + "Bunker Green Room Flowers EP", + "Swamp Purple Sand Middle EP", + "Swamp Purple Sand Top EP", + "Swamp Purple Sand Bottom EP", + "Swamp Sliding Bridge Left EP", + "Swamp Sliding Bridge Right EP", + "Swamp Cyan Underwater Sliding Bridge EP", + "Swamp Rotating Bridge CCW EP", + "Swamp Rotating Bridge CW EP", + "Swamp Boat EP", + "Swamp Long Bridge Side EP", + "Swamp Purple Underwater Right EP", + "Swamp Purple Underwater Left EP", + "Treehouse Buoy EP", + "Treehouse Right Orange Bridge EP", + "Treehouse Burned House Beach EP", + "Mountainside Cloud Cycle EP", + "Mountainside Bush EP", + "Mountainside Apparent River EP", + "Mountaintop River Shape EP", + "Mountaintop Arch Black EP", + "Mountaintop Arch White Right EP", + "Mountaintop Arch White Left EP", + "Mountain Bottom Floor Yellow Bridge EP", + "Mountain Bottom Floor Blue Bridge EP", + "Mountain Floor 2 Pink Bridge EP", + "Caves Skylight EP", + "Challenge Water EP", + "Tunnels Theater Flowers EP", + "Boat Desert EP", + "Boat Shipwreck CCW Underside EP", + "Boat Shipwreck Green EP", + "Boat Shipwreck CW Underside EP", + "Boat Bunker Yellow Line EP", + "Boat Town Long Sewer EP", + "Boat Tutorial EP", + "Boat Tutorial Reflection EP", + "Boat Tutorial Moss EP", + "Boat Cargo Box EP", + + "Desert Obelisk Side 1", + "Desert Obelisk Side 2", + "Desert Obelisk Side 3", + "Desert Obelisk Side 4", + "Desert Obelisk Side 5", + "Monastery Obelisk Side 1", + "Monastery Obelisk Side 2", + "Monastery Obelisk Side 3", + "Monastery Obelisk Side 4", + "Monastery Obelisk Side 5", + "Monastery Obelisk Side 6", + "Treehouse Obelisk Side 1", + "Treehouse Obelisk Side 2", + "Treehouse Obelisk Side 3", + "Treehouse Obelisk Side 4", + "Treehouse Obelisk Side 5", + "Treehouse Obelisk Side 6", + "Mountainside Obelisk Side 1", + "Mountainside Obelisk Side 2", + "Mountainside Obelisk Side 3", + "Mountainside Obelisk Side 4", + "Mountainside Obelisk Side 5", + "Mountainside Obelisk Side 6", + "Quarry Obelisk Side 1", + "Quarry Obelisk Side 2", + "Quarry Obelisk Side 3", + "Quarry Obelisk Side 4", + "Quarry Obelisk Side 5", + "Town Obelisk Side 1", + "Town Obelisk Side 2", + "Town Obelisk Side 3", + "Town Obelisk Side 4", + "Town Obelisk Side 5", + "Town Obelisk Side 6", + + "Caves Mountain Shortcut Panel", + "Caves Swamp Shortcut Panel", + + "Caves Blue Tunnel Right First 4", + "Caves Blue Tunnel Left First 1", + "Caves Blue Tunnel Left Second 5", + "Caves Blue Tunnel Right Second 5", + "Caves Blue Tunnel Right Third 1", + "Caves Blue Tunnel Left Fourth 1", + "Caves Blue Tunnel Left Third 1", + + "Caves First Floor Middle", + "Caves First Floor Right", + "Caves First Floor Left", + "Caves First Floor Grounded", + "Caves Lone Pillar", + "Caves First Wooden Beam", + "Caves Second Wooden Beam", + "Caves Third Wooden Beam", + "Caves Fourth Wooden Beam", + "Caves Right Upstairs Left Row 8", + "Caves Right Upstairs Right Row 3", + "Caves Left Upstairs Single", + "Caves Left Upstairs Left Row 5", + + "Caves Challenge Entry Panel", + "Challenge Tunnels Entry Panel", + + "Tunnels Vault Box", + "Theater Challenge Video", + + "Tunnels Town Shortcut Panel", + + "Caves Skylight EP", + "Challenge Water EP", + "Tunnels Theater Flowers EP", + "Tutorial Gate EP", + + "Mountaintop Mountain Entry Panel", + + "Mountain Floor 1 Light Bridge Controller", + + "Mountain Floor 1 Right Row 5", + "Mountain Floor 1 Left Row 7", + "Mountain Floor 1 Back Row 3", + "Mountain Floor 1 Trash Pillar 2", + "Mountain Floor 2 Near Row 5", + "Mountain Floor 2 Far Row 6", + + "Mountain Floor 2 Light Bridge Controller Near", + "Mountain Floor 2 Light Bridge Controller Far", + + "Mountain Bottom Floor Yellow Bridge EP", + "Mountain Bottom Floor Blue Bridge EP", + "Mountain Floor 2 Pink Bridge EP", + + "Mountain Floor 2 Elevator Discard", + "Mountain Bottom Floor Giant Puzzle", + + "Mountain Bottom Floor Pillars Room Entry Left", + "Mountain Bottom Floor Pillars Room Entry Right", + + "Mountain Bottom Floor Caves Entry Panel", + + "Mountain Bottom Floor Left Pillar 4", + "Mountain Bottom Floor Right Pillar 4", + + "Challenge Vault Box", + "Theater Challenge Video", + "Mountain Bottom Floor Discard", +} + +OBELISK_SIDES = { + "Desert Obelisk Side 1", + "Desert Obelisk Side 2", + "Desert Obelisk Side 3", + "Desert Obelisk Side 4", + "Desert Obelisk Side 5", + "Monastery Obelisk Side 1", + "Monastery Obelisk Side 2", + "Monastery Obelisk Side 3", + "Monastery Obelisk Side 4", + "Monastery Obelisk Side 5", + "Monastery Obelisk Side 6", + "Treehouse Obelisk Side 1", + "Treehouse Obelisk Side 2", + "Treehouse Obelisk Side 3", + "Treehouse Obelisk Side 4", + "Treehouse Obelisk Side 5", + "Treehouse Obelisk Side 6", + "Mountainside Obelisk Side 1", + "Mountainside Obelisk Side 2", + "Mountainside Obelisk Side 3", + "Mountainside Obelisk Side 4", + "Mountainside Obelisk Side 5", + "Mountainside Obelisk Side 6", + "Quarry Obelisk Side 1", + "Quarry Obelisk Side 2", + "Quarry Obelisk Side 3", + "Quarry Obelisk Side 4", + "Quarry Obelisk Side 5", + "Town Obelisk Side 1", + "Town Obelisk Side 2", + "Town Obelisk Side 3", + "Town Obelisk Side 4", + "Town Obelisk Side 5", + "Town Obelisk Side 6", +} + +ALL_LOCATIONS_TO_ID = dict() + +AREA_LOCATION_GROUPS = dict() + + +def get_id(entity_hex: str) -> str: + """ + Calculates the location ID for any given location + """ + + return static_witness_logic.ENTITIES_BY_HEX[entity_hex]["id"] + + +def get_event_name(entity_hex: str) -> str: + """ + Returns the event name of any given panel. + """ + + action = " Opened" if static_witness_logic.ENTITIES_BY_HEX[entity_hex]["entityType"] == "Door" else " Solved" + + return static_witness_logic.ENTITIES_BY_HEX[entity_hex]["checkName"] + action + + +ALL_LOCATIONS_TO_IDS = { + panel_obj["checkName"]: get_id(chex) + for chex, panel_obj in static_witness_logic.ENTITIES_BY_HEX.items() + if panel_obj["id"] +} + +ALL_LOCATIONS_TO_IDS = dict( + sorted(ALL_LOCATIONS_TO_IDS.items(), key=lambda loc: loc[1]) +) + +for key, item in ALL_LOCATIONS_TO_IDS.items(): + ALL_LOCATIONS_TO_ID[key] = item + +for loc in ALL_LOCATIONS_TO_IDS: + area = static_witness_logic.ENTITIES_BY_NAME[loc]["area"]["name"] + AREA_LOCATION_GROUPS.setdefault(area, []).append(loc) diff --git a/worlds/witness/static_logic.py b/worlds/witness/data/static_logic.py similarity index 51% rename from worlds/witness/static_logic.py rename to worlds/witness/data/static_logic.py index 3efab4915e69..94e6f7a3cc97 100644 --- a/worlds/witness/static_logic.py +++ b/worlds/witness/data/static_logic.py @@ -1,56 +1,26 @@ -from dataclasses import dataclass -from enum import Enum +from functools import lru_cache from typing import Dict, List -from .utils import define_new_region, parse_lambda, lazy, get_items, get_sigma_normal_logic, get_sigma_expert_logic,\ - get_vanilla_logic - - -class ItemCategory(Enum): - SYMBOL = 0 - DOOR = 1 - LASER = 2 - USEFUL = 3 - FILLER = 4 - TRAP = 5 - JOKE = 6 - EVENT = 7 - - -CATEGORY_NAME_MAPPINGS: Dict[str, ItemCategory] = { - "Symbols:": ItemCategory.SYMBOL, - "Doors:": ItemCategory.DOOR, - "Lasers:": ItemCategory.LASER, - "Useful:": ItemCategory.USEFUL, - "Filler:": ItemCategory.FILLER, - "Traps:": ItemCategory.TRAP, - "Jokes:": ItemCategory.JOKE -} - - -@dataclass(frozen=True) -class ItemDefinition: - local_code: int - category: ItemCategory - - -@dataclass(frozen=True) -class ProgressiveItemDefinition(ItemDefinition): - child_item_names: List[str] - - -@dataclass(frozen=True) -class DoorItemDefinition(ItemDefinition): - panel_id_hexes: List[str] - - -@dataclass(frozen=True) -class WeightedItemDefinition(ItemDefinition): - weight: int +from .item_definition_classes import ( + CATEGORY_NAME_MAPPINGS, + DoorItemDefinition, + ItemCategory, + ItemDefinition, + ProgressiveItemDefinition, + WeightedItemDefinition, +) +from .utils import ( + define_new_region, + get_items, + get_sigma_expert_logic, + get_sigma_normal_logic, + get_vanilla_logic, + parse_lambda, +) class StaticWitnessLogicObj: - def read_logic_file(self, lines): + def read_logic_file(self, lines) -> None: """ Reads the logic file and does the initial population of data structures """ @@ -152,7 +122,7 @@ def read_logic_file(self, lines): } if location_type == "Obelisk Side": - eps = set(list(required_panels)[0]) + eps = set(next(iter(required_panels))) eps -= {"Theater to Tunnels"} eps_ints = {int(h, 16) for h in eps} @@ -177,7 +147,7 @@ def read_logic_file(self, lines): current_region["panels"].append(entity_hex) - def __init__(self, lines=None): + def __init__(self, lines=None) -> None: if lines is None: lines = get_sigma_normal_logic() @@ -199,102 +169,95 @@ def __init__(self, lines=None): self.read_logic_file(lines) -class StaticWitnessLogic: - # Item data parsed from WitnessItems.txt - all_items: Dict[str, ItemDefinition] = {} - _progressive_lookup: Dict[str, str] = {} +# Item data parsed from WitnessItems.txt +ALL_ITEMS: Dict[str, ItemDefinition] = {} +_progressive_lookup: Dict[str, str] = {} - ALL_REGIONS_BY_NAME = dict() - ALL_AREAS_BY_NAME = dict() - STATIC_CONNECTIONS_BY_REGION_NAME = dict() - OBELISK_SIDE_ID_TO_EP_HEXES = dict() +def parse_items() -> None: + """ + Parses currently defined items from WitnessItems.txt + """ - ENTITIES_BY_HEX = dict() - ENTITIES_BY_NAME = dict() - STATIC_DEPENDENT_REQUIREMENTS_BY_HEX = dict() + lines: List[str] = get_items() + current_category: ItemCategory = ItemCategory.SYMBOL - EP_TO_OBELISK_SIDE = dict() + for line in lines: + # Skip empty lines and comments. + if line == "" or line[0] == "#": + continue - ENTITY_ID_TO_NAME = dict() + # If this line is a category header, update our cached category. + if line in CATEGORY_NAME_MAPPINGS.keys(): + current_category = CATEGORY_NAME_MAPPINGS[line] + continue - @staticmethod - def parse_items(): - """ - Parses currently defined items from WitnessItems.txt - """ + line_split = line.split(" - ") - lines: List[str] = get_items() - current_category: ItemCategory = ItemCategory.SYMBOL + item_code = int(line_split[0]) + item_name = line_split[1] + arguments: List[str] = line_split[2].split(",") if len(line_split) >= 3 else [] - for line in lines: - # Skip empty lines and comments. - if line == "" or line[0] == "#": - continue + if current_category in [ItemCategory.DOOR, ItemCategory.LASER]: + # Map doors to IDs. + ALL_ITEMS[item_name] = DoorItemDefinition(item_code, current_category, arguments) + elif current_category == ItemCategory.TRAP or current_category == ItemCategory.FILLER: + # Read filler weights. + weight = int(arguments[0]) if len(arguments) >= 1 else 1 + ALL_ITEMS[item_name] = WeightedItemDefinition(item_code, current_category, weight) + elif arguments: + # Progressive items. + ALL_ITEMS[item_name] = ProgressiveItemDefinition(item_code, current_category, arguments) + for child_item in arguments: + _progressive_lookup[child_item] = item_name + else: + ALL_ITEMS[item_name] = ItemDefinition(item_code, current_category) - # If this line is a category header, update our cached category. - if line in CATEGORY_NAME_MAPPINGS.keys(): - current_category = CATEGORY_NAME_MAPPINGS[line] - continue - line_split = line.split(" - ") +def get_parent_progressive_item(item_name: str) -> str: + """ + Returns the name of the item's progressive parent, if there is one, or the item's name if not. + """ + return _progressive_lookup.get(item_name, item_name) - item_code = int(line_split[0]) - item_name = line_split[1] - arguments: List[str] = line_split[2].split(",") if len(line_split) >= 3 else [] - - if current_category in [ItemCategory.DOOR, ItemCategory.LASER]: - # Map doors to IDs. - StaticWitnessLogic.all_items[item_name] = DoorItemDefinition(item_code, current_category, - arguments) - elif current_category == ItemCategory.TRAP or current_category == ItemCategory.FILLER: - # Read filler weights. - weight = int(arguments[0]) if len(arguments) >= 1 else 1 - StaticWitnessLogic.all_items[item_name] = WeightedItemDefinition(item_code, current_category, weight) - elif arguments: - # Progressive items. - StaticWitnessLogic.all_items[item_name] = ProgressiveItemDefinition(item_code, current_category, - arguments) - for child_item in arguments: - StaticWitnessLogic._progressive_lookup[child_item] = item_name - else: - StaticWitnessLogic.all_items[item_name] = ItemDefinition(item_code, current_category) - @staticmethod - def get_parent_progressive_item(item_name: str): - """ - Returns the name of the item's progressive parent, if there is one, or the item's name if not. - """ - return StaticWitnessLogic._progressive_lookup.get(item_name, item_name) +@lru_cache +def get_vanilla() -> StaticWitnessLogicObj: + return StaticWitnessLogicObj(get_vanilla_logic()) + + +@lru_cache +def get_sigma_normal() -> StaticWitnessLogicObj: + return StaticWitnessLogicObj(get_sigma_normal_logic()) - @lazy - def sigma_expert(self) -> StaticWitnessLogicObj: - return StaticWitnessLogicObj(get_sigma_expert_logic()) - @lazy - def sigma_normal(self) -> StaticWitnessLogicObj: - return StaticWitnessLogicObj(get_sigma_normal_logic()) +@lru_cache +def get_sigma_expert() -> StaticWitnessLogicObj: + return StaticWitnessLogicObj(get_sigma_expert_logic()) - @lazy - def vanilla(self) -> StaticWitnessLogicObj: - return StaticWitnessLogicObj(get_vanilla_logic()) - def __init__(self): - self.parse_items() +def __getattr__(name): + if name == "vanilla": + return get_vanilla() + elif name == "sigma_normal": + return get_sigma_normal() + elif name == "sigma_expert": + return get_sigma_expert() + raise AttributeError(f"module '{__name__}' has no attribute '{name}'") - self.ALL_REGIONS_BY_NAME.update(self.sigma_normal.ALL_REGIONS_BY_NAME) - self.ALL_AREAS_BY_NAME.update(self.sigma_normal.ALL_AREAS_BY_NAME) - self.STATIC_CONNECTIONS_BY_REGION_NAME.update(self.sigma_normal.STATIC_CONNECTIONS_BY_REGION_NAME) - self.ENTITIES_BY_HEX.update(self.sigma_normal.ENTITIES_BY_HEX) - self.ENTITIES_BY_NAME.update(self.sigma_normal.ENTITIES_BY_NAME) - self.STATIC_DEPENDENT_REQUIREMENTS_BY_HEX.update(self.sigma_normal.STATIC_DEPENDENT_REQUIREMENTS_BY_HEX) +parse_items() - self.OBELISK_SIDE_ID_TO_EP_HEXES.update(self.sigma_normal.OBELISK_SIDE_ID_TO_EP_HEXES) +ALL_REGIONS_BY_NAME = get_sigma_normal().ALL_REGIONS_BY_NAME +ALL_AREAS_BY_NAME = get_sigma_normal().ALL_AREAS_BY_NAME +STATIC_CONNECTIONS_BY_REGION_NAME = get_sigma_normal().STATIC_CONNECTIONS_BY_REGION_NAME - self.EP_TO_OBELISK_SIDE.update(self.sigma_normal.EP_TO_OBELISK_SIDE) +ENTITIES_BY_HEX = get_sigma_normal().ENTITIES_BY_HEX +ENTITIES_BY_NAME = get_sigma_normal().ENTITIES_BY_NAME +STATIC_DEPENDENT_REQUIREMENTS_BY_HEX = get_sigma_normal().STATIC_DEPENDENT_REQUIREMENTS_BY_HEX - self.ENTITY_ID_TO_NAME.update(self.sigma_normal.ENTITY_ID_TO_NAME) +OBELISK_SIDE_ID_TO_EP_HEXES = get_sigma_normal().OBELISK_SIDE_ID_TO_EP_HEXES +EP_TO_OBELISK_SIDE = get_sigma_normal().EP_TO_OBELISK_SIDE -StaticWitnessLogic() +ENTITY_ID_TO_NAME = get_sigma_normal().ENTITY_ID_TO_NAME diff --git a/worlds/witness/utils.py b/worlds/witness/data/utils.py similarity index 93% rename from worlds/witness/utils.py rename to worlds/witness/data/utils.py index 43e039475d80..bb89227ca37f 100644 --- a/worlds/witness/utils.py +++ b/worlds/witness/data/utils.py @@ -1,11 +1,11 @@ from functools import lru_cache from math import floor -from typing import List, Collection, FrozenSet, Tuple, Dict, Any, Set from pkgutil import get_data from random import random +from typing import Any, Collection, Dict, FrozenSet, List, Set, Tuple -def weighted_sample(world_random: random, population: List, weights: List[float], k: int): +def weighted_sample(world_random: random, population: List, weights: List[float], k: int) -> List: positions = range(len(population)) indices = [] while True: @@ -95,25 +95,9 @@ def parse_lambda(lambda_string) -> FrozenSet[FrozenSet[str]]: return lambda_set -class lazy(object): - def __init__(self, func, name=None): - self.func = func - self.name = name if name is not None else func.__name__ - self.__doc__ = func.__doc__ - - def __get__(self, instance, class_): - if instance is None: - res = self.func(class_) - setattr(class_, self.name, res) - return res - res = self.func(instance) - setattr(instance, self.name, res) - return res - - @lru_cache(maxsize=None) def get_adjustment_file(adjustment_file: str) -> List[str]: - data = get_data(__name__, adjustment_file).decode('utf-8') + data = get_data(__name__, adjustment_file).decode("utf-8") return [line.strip() for line in data.split("\n")] diff --git a/worlds/witness/hints.py b/worlds/witness/hints.py index 6ebf8eeec00d..786b52d68848 100644 --- a/worlds/witness/hints.py +++ b/worlds/witness/hints.py @@ -1,9 +1,11 @@ import logging from dataclasses import dataclass -from typing import Tuple, List, TYPE_CHECKING, Set, Dict, Optional, Union -from BaseClasses import Item, ItemClassification, Location, LocationProgressType, CollectionState -from . import StaticWitnessLogic -from .utils import weighted_sample +from typing import TYPE_CHECKING, Dict, List, Optional, Set, Tuple, Union + +from BaseClasses import CollectionState, Item, Location, LocationProgressType + +from .data import static_logic as static_witness_logic +from .data.utils import weighted_sample if TYPE_CHECKING: from . import WitnessWorld @@ -22,7 +24,7 @@ "Have you tried Clique?\nIt's certainly a lot less complicated than this game!", "Have you tried Dark Souls III?\nA tough game like this feels better when friends are helping you!", "Have you tried Donkey Kong Country 3?\nA legendary game from a golden age of platformers!", - "Have you tried DLC Quest?\nI know you all like parody games.\nI got way too many requests to make a randomizer for \"The Looker\".", + 'Have you tried DLC Quest?\nI know you all like parody games.\nI got way too many requests to make a randomizer for "The Looker".', "Have you tried Doom?\nI wonder if a smart fridge can connect to Archipelago.", "Have you tried Doom II?\nGot a good game on your hands? Just make it bigger and better.", "Have you tried Factorio?\nAlone in an unknown multiworld. Sound familiar?", @@ -62,9 +64,9 @@ "Have you tried Slay the Spire?\nExperience the thrill of combat without needing fast fingers!", "Have you tried Stardew Valley?\nThe Farming game that gave a damn. It's so easy to lose hours and days to it...", "Have you tried Subnautica?\nIf you like this game's lonely atmosphere, I would suggest you try it.", - "Have you tried Terraria?\nA prime example of a survival sandbox game that beats the \"Wide as an ocean, deep as a puddle\" allegations.", + 'Have you tried Terraria?\nA prime example of a survival sandbox game that beats the "Wide as an ocean, deep as a puddle" allegations.', "Have you tried Timespinner?\nEveryone who plays it ends up loving it!", - "Have you tried The Legend of Zelda?\nIn some sense, it was the starting point of \"adventure\" in video games.", + 'Have you tried The Legend of Zelda?\nIn some sense, it was the starting point of "adventure" in video games.', "Have you tried TUNC?\nWhat? No, I'm pretty sure I spelled that right.", "Have you tried TUNIC?\nRemember what discovering your first Environmental Puzzle was like?\nTUNIC will make you feel like that at least 5 times over.", "Have you tried Undertale?\nI hope I'm not the 10th person to ask you that. But it's, like, really good.", @@ -72,7 +74,7 @@ "Have you tried Wargroove?\nI'm glad that for every abandoned series, enough people are yearning for its return that one of them will know how to code.", "Have you tried The Witness?\nOh. I guess you already have. Thanks for playing!", "Have you tried Zillion?\nMe neither. But it looks fun. So, let's try something new together?", - "Have you tried Zork: Grand Inquisitor?\nThis 1997 game uses Z-Vision technology to simulate 3D environments.\nCome on, I know you wanna find out what \"Z-Vision\" is.", + 'Have you tried Zork: Grand Inquisitor?\nThis 1997 game uses Z-Vision technology to simulate 3D environments.\nCome on, I know you wanna find out what "Z-Vision" is.', "Quaternions break my brain", "Eclipse has nothing, but you should do it anyway.", @@ -136,10 +138,10 @@ "In the future, war will break out between obelisk_sides and individual EP players.\nWhich side are you on?", "Droplets: Low, High, Mid.\nAmbience: Mid, Low, Mid, High.", "Name a better game involving lines. I'll wait.", - "\"You have to draw a line in the sand.\"\n- Arin \"Egoraptor\" Hanson", + '"You have to draw a line in the sand."\n- Arin "Egoraptor" Hanson', "Have you tried?\nThe puzzles tend to get easier if you do.", "Sorry, I accidentally left my phone in the Jungle.\nAnd also all my fragile dishes.", - "Winner of the \"Most Irrelevant PR in AP History\" award!", + 'Winner of the "Most Irrelevant PR in AP History" award!', "I bet you wish this was a real hint :)", "\"This hint is an impostor.\"- Junk hint submitted by T1mshady.\n...wait, I'm not supposed to say that part?", "Wouldn't you like to know, weather buoy?", @@ -192,10 +194,10 @@ class WitnessLocationHint: hint_came_from_location: bool # If a hint gets added to a set twice, but once as an item hint and once as a location hint, those are the same - def __hash__(self): + def __hash__(self) -> int: return hash(self.location) - def __eq__(self, other): + def __eq__(self, other) -> bool: return self.location == other.location @@ -324,7 +326,7 @@ def get_priority_hint_locations(world: "WitnessWorld") -> List[str]: "Boat Shipwreck Green EP", "Quarry Stoneworks Control Room Left", ] - + # Add Obelisk Sides that contain EPs that are meant to be hinted, if they are necessary to complete the Obelisk Side if "0x33A20" not in world.player_logic.COMPLETELY_DISABLED_ENTITIES: priority.append("Town Obelisk Side 6") # Theater Flowers EP @@ -338,7 +340,7 @@ def get_priority_hint_locations(world: "WitnessWorld") -> List[str]: return priority -def word_direct_hint(world: "WitnessWorld", hint: WitnessLocationHint): +def word_direct_hint(world: "WitnessWorld", hint: WitnessLocationHint) -> WitnessWordedHint: location_name = hint.location.name if hint.location.player != world.player: location_name += " (" + world.multiworld.get_player_name(hint.location.player) + ")" @@ -373,8 +375,8 @@ def hint_from_item(world: "WitnessWorld", item_name: str, own_itempool: List[Ite def hint_from_location(world: "WitnessWorld", location: str) -> Optional[WitnessLocationHint]: - location_obj = world.multiworld.get_location(location, world.player) - item_obj = world.multiworld.get_location(location, world.player).item + location_obj = world.get_location(location) + item_obj = location_obj.item item_name = item_obj.name if item_obj.player != world.player: item_name += " (" + world.multiworld.get_player_name(item_obj.player) + ")" @@ -382,7 +384,8 @@ def hint_from_location(world: "WitnessWorld", location: str) -> Optional[Witness return WitnessLocationHint(location_obj, True) -def get_items_and_locations_in_random_order(world: "WitnessWorld", own_itempool: List[Item]): +def get_items_and_locations_in_random_order(world: "WitnessWorld", + own_itempool: List[Item]) -> Tuple[List[str], List[str]]: prog_items_in_this_world = sorted( item.name for item in own_itempool if item.advancement and item.code and item.location @@ -455,7 +458,11 @@ def make_extra_location_hints(world: "WitnessWorld", hint_amount: int, own_itemp hints = [] # This is a way to reverse a Dict[a,List[b]] to a Dict[b,a] - area_reverse_lookup = {v: k for k, l in unhinted_locations_for_hinted_areas.items() for v in l} + area_reverse_lookup = { + unhinted_location: hinted_area + for hinted_area, unhinted_locations in unhinted_locations_for_hinted_areas.items() + for unhinted_location in unhinted_locations + } while len(hints) < hint_amount: if not prog_items_in_this_world and not locations_in_this_world and not hints_to_use_first: @@ -529,16 +536,16 @@ def choose_areas(world: "WitnessWorld", amount: int, locations_per_area: Dict[st def get_hintable_areas(world: "WitnessWorld") -> Tuple[Dict[str, List[Location]], Dict[str, List[Item]]]: - potential_areas = list(StaticWitnessLogic.ALL_AREAS_BY_NAME.keys()) + potential_areas = list(static_witness_logic.ALL_AREAS_BY_NAME.keys()) locations_per_area = dict() items_per_area = dict() for area in potential_areas: regions = [ - world.regio.created_regions[region] - for region in StaticWitnessLogic.ALL_AREAS_BY_NAME[area]["regions"] - if region in world.regio.created_regions + world.player_regions.created_regions[region] + for region in static_witness_logic.ALL_AREAS_BY_NAME[area]["regions"] + if region in world.player_regions.created_regions ] locations = [location for region in regions for location in region.get_locations() if location.address] @@ -596,7 +603,7 @@ def word_area_hint(world: "WitnessWorld", hinted_area: str, corresponding_items: if local_lasers == total_progression: sentence_end = (" for this world." if player_count > 1 else ".") - hint_string += f"\nAll of them are lasers" + sentence_end + hint_string += "\nAll of them are lasers" + sentence_end elif player_count > 1: if local_progression and non_local_progression: @@ -663,7 +670,7 @@ def create_all_hints(world: "WitnessWorld", hint_amount: int, area_hints: int, already_hinted_locations |= { loc for loc in world.multiworld.get_reachable_locations(state, world.player) - if loc.address and StaticWitnessLogic.ENTITIES_BY_NAME[loc.name]["area"]["name"] == "Tutorial (Inside)" + if loc.address and static_witness_logic.ENTITIES_BY_NAME[loc.name]["area"]["name"] == "Tutorial (Inside)" } intended_location_hints = hint_amount - area_hints diff --git a/worlds/witness/locations.py b/worlds/witness/locations.py index cd6d71f46911..df8214ac9221 100644 --- a/worlds/witness/locations.py +++ b/worlds/witness/locations.py @@ -3,511 +3,24 @@ """ from typing import TYPE_CHECKING +from .data import static_locations as static_witness_locations +from .data import static_logic as static_witness_logic from .player_logic import WitnessPlayerLogic -from .static_logic import StaticWitnessLogic if TYPE_CHECKING: from . import WitnessWorld -ID_START = 158000 - - -class StaticWitnessLocations: - """ - Witness Location Constants that stay consistent across worlds - """ - - GENERAL_LOCATIONS = { - "Tutorial Front Left", - "Tutorial Back Left", - "Tutorial Back Right", - "Tutorial Patio Floor", - "Tutorial Gate Open", - - "Outside Tutorial Vault Box", - "Outside Tutorial Discard", - "Outside Tutorial Shed Row 5", - "Outside Tutorial Tree Row 9", - "Outside Tutorial Outpost Entry Panel", - "Outside Tutorial Outpost Exit Panel", - - "Glass Factory Discard", - "Glass Factory Back Wall 5", - "Glass Factory Front 3", - "Glass Factory Melting 3", - - "Symmetry Island Lower Panel", - "Symmetry Island Right 5", - "Symmetry Island Back 6", - "Symmetry Island Left 7", - "Symmetry Island Upper Panel", - "Symmetry Island Scenery Outlines 5", - "Symmetry Island Laser Yellow 3", - "Symmetry Island Laser Blue 3", - "Symmetry Island Laser Panel", - - "Orchard Apple Tree 5", - - "Desert Vault Box", - "Desert Discard", - "Desert Surface 8", - "Desert Light Room 3", - "Desert Pond Room 5", - "Desert Flood Room 6", - "Desert Elevator Room Hexagonal", - "Desert Elevator Room Bent 3", - "Desert Laser Panel", - - "Quarry Entry 1 Panel", - "Quarry Entry 2 Panel", - "Quarry Stoneworks Entry Left Panel", - "Quarry Stoneworks Entry Right Panel", - "Quarry Stoneworks Lower Row 6", - "Quarry Stoneworks Upper Row 8", - "Quarry Stoneworks Control Room Left", - "Quarry Stoneworks Control Room Right", - "Quarry Stoneworks Stairs Panel", - "Quarry Boathouse Intro Right", - "Quarry Boathouse Intro Left", - "Quarry Boathouse Front Row 5", - "Quarry Boathouse Back First Row 9", - "Quarry Boathouse Back Second Row 3", - "Quarry Discard", - "Quarry Laser Panel", - - "Shadows Intro 8", - "Shadows Far 8", - "Shadows Near 5", - "Shadows Laser Panel", - - "Keep Hedge Maze 1", - "Keep Hedge Maze 2", - "Keep Hedge Maze 3", - "Keep Hedge Maze 4", - "Keep Pressure Plates 1", - "Keep Pressure Plates 2", - "Keep Pressure Plates 3", - "Keep Pressure Plates 4", - "Keep Discard", - "Keep Laser Panel Hedges", - "Keep Laser Panel Pressure Plates", - - "Shipwreck Vault Box", - "Shipwreck Discard", - - "Monastery Outside 3", - "Monastery Inside 4", - "Monastery Laser Panel", - - "Town Cargo Box Entry Panel", - "Town Cargo Box Discard", - "Town Tall Hexagonal", - "Town Church Entry Panel", - "Town Church Lattice", - "Town Maze Panel", - "Town Rooftop Discard", - "Town Red Rooftop 5", - "Town Wooden Roof Lower Row 5", - "Town Wooden Rooftop", - "Windmill Entry Panel", - "Town RGB House Entry Panel", - "Town Laser Panel", - - "Town RGB House Upstairs Left", - "Town RGB House Upstairs Right", - "Town RGB House Sound Room Right", - - "Windmill Theater Entry Panel", - "Theater Exit Left Panel", - "Theater Exit Right Panel", - "Theater Tutorial Video", - "Theater Desert Video", - "Theater Jungle Video", - "Theater Shipwreck Video", - "Theater Mountain Video", - "Theater Discard", - - "Jungle Discard", - "Jungle First Row 3", - "Jungle Second Row 4", - "Jungle Popup Wall 6", - "Jungle Laser Panel", - - "Jungle Vault Box", - "Jungle Monastery Garden Shortcut Panel", - - "Bunker Entry Panel", - "Bunker Intro Left 5", - "Bunker Intro Back 4", - "Bunker Glass Room 3", - "Bunker UV Room 2", - "Bunker Laser Panel", - - "Swamp Entry Panel", - "Swamp Intro Front 6", - "Swamp Intro Back 8", - "Swamp Between Bridges Near Row 4", - "Swamp Cyan Underwater 5", - "Swamp Platform Row 4", - "Swamp Platform Shortcut Right Panel", - "Swamp Between Bridges Far Row 4", - "Swamp Red Underwater 4", - "Swamp Purple Underwater", - "Swamp Beyond Rotating Bridge 4", - "Swamp Blue Underwater 5", - "Swamp Laser Panel", - "Swamp Laser Shortcut Right Panel", - - "Treehouse First Door Panel", - "Treehouse Second Door Panel", - "Treehouse Third Door Panel", - "Treehouse Yellow Bridge 9", - "Treehouse First Purple Bridge 5", - "Treehouse Second Purple Bridge 7", - "Treehouse Green Bridge 7", - "Treehouse Green Bridge Discard", - "Treehouse Left Orange Bridge 15", - "Treehouse Laser Discard", - "Treehouse Right Orange Bridge 12", - "Treehouse Laser Panel", - "Treehouse Drawbridge Panel", - - "Mountainside Discard", - "Mountainside Vault Box", - "Mountaintop River Shape", - - "Tutorial First Hallway EP", - "Tutorial Cloud EP", - "Tutorial Patio Flowers EP", - "Tutorial Gate EP", - "Outside Tutorial Garden EP", - "Outside Tutorial Town Sewer EP", - "Outside Tutorial Path EP", - "Outside Tutorial Tractor EP", - "Mountainside Thundercloud EP", - "Glass Factory Vase EP", - "Symmetry Island Glass Factory Black Line Reflection EP", - "Symmetry Island Glass Factory Black Line EP", - "Desert Sand Snake EP", - "Desert Facade Right EP", - "Desert Facade Left EP", - "Desert Stairs Left EP", - "Desert Stairs Right EP", - "Desert Broken Wall Straight EP", - "Desert Broken Wall Bend EP", - "Desert Shore EP", - "Desert Island EP", - "Desert Pond Room Near Reflection EP", - "Desert Pond Room Far Reflection EP", - "Desert Flood Room EP", - "Desert Elevator EP", - "Quarry Shore EP", - "Quarry Entrance Pipe EP", - "Quarry Sand Pile EP", - "Quarry Rock Line EP", - "Quarry Rock Line Reflection EP", - "Quarry Railroad EP", - "Quarry Stoneworks Ramp EP", - "Quarry Stoneworks Lift EP", - "Quarry Boathouse Moving Ramp EP", - "Quarry Boathouse Hook EP", - "Shadows Quarry Stoneworks Rooftop Vent EP", - "Treehouse Beach Rock Shadow EP", - "Treehouse Beach Sand Shadow EP", - "Treehouse Beach Both Orange Bridges EP", - "Keep Red Flowers EP", - "Keep Purple Flowers EP", - "Shipwreck Circle Near EP", - "Shipwreck Circle Left EP", - "Shipwreck Circle Far EP", - "Shipwreck Stern EP", - "Shipwreck Rope Inner EP", - "Shipwreck Rope Outer EP", - "Shipwreck Couch EP", - "Keep Pressure Plates 1 EP", - "Keep Pressure Plates 2 EP", - "Keep Pressure Plates 3 EP", - "Keep Pressure Plates 4 Left Exit EP", - "Keep Pressure Plates 4 Right Exit EP", - "Keep Path EP", - "Keep Hedges EP", - "Monastery Facade Left Near EP", - "Monastery Facade Left Far Short EP", - "Monastery Facade Left Far Long EP", - "Monastery Facade Right Near EP", - "Monastery Facade Left Stairs EP", - "Monastery Facade Right Stairs EP", - "Monastery Grass Stairs EP", - "Monastery Left Shutter EP", - "Monastery Middle Shutter EP", - "Monastery Right Shutter EP", - "Windmill First Blade EP", - "Windmill Second Blade EP", - "Windmill Third Blade EP", - "Town Tower Underside Third EP", - "Town Tower Underside Fourth EP", - "Town Tower Underside First EP", - "Town Tower Underside Second EP", - "Town RGB House Red EP", - "Town RGB House Green EP", - "Town Maze Bridge Underside EP", - "Town Black Line Redirect EP", - "Town Black Line Church EP", - "Town Brown Bridge EP", - "Town Black Line Tower EP", - "Theater Eclipse EP", - "Theater Window EP", - "Theater Door EP", - "Theater Church EP", - "Jungle Long Arch Moss EP", - "Jungle Straight Left Moss EP", - "Jungle Pop-up Wall Moss EP", - "Jungle Short Arch Moss EP", - "Jungle Entrance EP", - "Jungle Tree Halo EP", - "Jungle Bamboo CCW EP", - "Jungle Bamboo CW EP", - "Jungle Green Leaf Moss EP", - "Monastery Garden Left EP", - "Monastery Garden Right EP", - "Monastery Wall EP", - "Bunker Tinted Door EP", - "Bunker Green Room Flowers EP", - "Swamp Purple Sand Middle EP", - "Swamp Purple Sand Top EP", - "Swamp Purple Sand Bottom EP", - "Swamp Sliding Bridge Left EP", - "Swamp Sliding Bridge Right EP", - "Swamp Cyan Underwater Sliding Bridge EP", - "Swamp Rotating Bridge CCW EP", - "Swamp Rotating Bridge CW EP", - "Swamp Boat EP", - "Swamp Long Bridge Side EP", - "Swamp Purple Underwater Right EP", - "Swamp Purple Underwater Left EP", - "Treehouse Buoy EP", - "Treehouse Right Orange Bridge EP", - "Treehouse Burned House Beach EP", - "Mountainside Cloud Cycle EP", - "Mountainside Bush EP", - "Mountainside Apparent River EP", - "Mountaintop River Shape EP", - "Mountaintop Arch Black EP", - "Mountaintop Arch White Right EP", - "Mountaintop Arch White Left EP", - "Mountain Bottom Floor Yellow Bridge EP", - "Mountain Bottom Floor Blue Bridge EP", - "Mountain Floor 2 Pink Bridge EP", - "Caves Skylight EP", - "Challenge Water EP", - "Tunnels Theater Flowers EP", - "Boat Desert EP", - "Boat Shipwreck CCW Underside EP", - "Boat Shipwreck Green EP", - "Boat Shipwreck CW Underside EP", - "Boat Bunker Yellow Line EP", - "Boat Town Long Sewer EP", - "Boat Tutorial EP", - "Boat Tutorial Reflection EP", - "Boat Tutorial Moss EP", - "Boat Cargo Box EP", - - "Desert Obelisk Side 1", - "Desert Obelisk Side 2", - "Desert Obelisk Side 3", - "Desert Obelisk Side 4", - "Desert Obelisk Side 5", - "Monastery Obelisk Side 1", - "Monastery Obelisk Side 2", - "Monastery Obelisk Side 3", - "Monastery Obelisk Side 4", - "Monastery Obelisk Side 5", - "Monastery Obelisk Side 6", - "Treehouse Obelisk Side 1", - "Treehouse Obelisk Side 2", - "Treehouse Obelisk Side 3", - "Treehouse Obelisk Side 4", - "Treehouse Obelisk Side 5", - "Treehouse Obelisk Side 6", - "Mountainside Obelisk Side 1", - "Mountainside Obelisk Side 2", - "Mountainside Obelisk Side 3", - "Mountainside Obelisk Side 4", - "Mountainside Obelisk Side 5", - "Mountainside Obelisk Side 6", - "Quarry Obelisk Side 1", - "Quarry Obelisk Side 2", - "Quarry Obelisk Side 3", - "Quarry Obelisk Side 4", - "Quarry Obelisk Side 5", - "Town Obelisk Side 1", - "Town Obelisk Side 2", - "Town Obelisk Side 3", - "Town Obelisk Side 4", - "Town Obelisk Side 5", - "Town Obelisk Side 6", - - "Caves Mountain Shortcut Panel", - "Caves Swamp Shortcut Panel", - - "Caves Blue Tunnel Right First 4", - "Caves Blue Tunnel Left First 1", - "Caves Blue Tunnel Left Second 5", - "Caves Blue Tunnel Right Second 5", - "Caves Blue Tunnel Right Third 1", - "Caves Blue Tunnel Left Fourth 1", - "Caves Blue Tunnel Left Third 1", - - "Caves First Floor Middle", - "Caves First Floor Right", - "Caves First Floor Left", - "Caves First Floor Grounded", - "Caves Lone Pillar", - "Caves First Wooden Beam", - "Caves Second Wooden Beam", - "Caves Third Wooden Beam", - "Caves Fourth Wooden Beam", - "Caves Right Upstairs Left Row 8", - "Caves Right Upstairs Right Row 3", - "Caves Left Upstairs Single", - "Caves Left Upstairs Left Row 5", - - "Caves Challenge Entry Panel", - "Challenge Tunnels Entry Panel", - - "Tunnels Vault Box", - "Theater Challenge Video", - - "Tunnels Town Shortcut Panel", - - "Caves Skylight EP", - "Challenge Water EP", - "Tunnels Theater Flowers EP", - "Tutorial Gate EP", - - "Mountaintop Mountain Entry Panel", - - "Mountain Floor 1 Light Bridge Controller", - - "Mountain Floor 1 Right Row 5", - "Mountain Floor 1 Left Row 7", - "Mountain Floor 1 Back Row 3", - "Mountain Floor 1 Trash Pillar 2", - "Mountain Floor 2 Near Row 5", - "Mountain Floor 2 Far Row 6", - - "Mountain Floor 2 Light Bridge Controller Near", - "Mountain Floor 2 Light Bridge Controller Far", - - "Mountain Bottom Floor Yellow Bridge EP", - "Mountain Bottom Floor Blue Bridge EP", - "Mountain Floor 2 Pink Bridge EP", - - "Mountain Floor 2 Elevator Discard", - "Mountain Bottom Floor Giant Puzzle", - - "Mountain Bottom Floor Pillars Room Entry Left", - "Mountain Bottom Floor Pillars Room Entry Right", - - "Mountain Bottom Floor Caves Entry Panel", - - "Mountain Bottom Floor Left Pillar 4", - "Mountain Bottom Floor Right Pillar 4", - - "Challenge Vault Box", - "Theater Challenge Video", - "Mountain Bottom Floor Discard", - } - - OBELISK_SIDES = { - "Desert Obelisk Side 1", - "Desert Obelisk Side 2", - "Desert Obelisk Side 3", - "Desert Obelisk Side 4", - "Desert Obelisk Side 5", - "Monastery Obelisk Side 1", - "Monastery Obelisk Side 2", - "Monastery Obelisk Side 3", - "Monastery Obelisk Side 4", - "Monastery Obelisk Side 5", - "Monastery Obelisk Side 6", - "Treehouse Obelisk Side 1", - "Treehouse Obelisk Side 2", - "Treehouse Obelisk Side 3", - "Treehouse Obelisk Side 4", - "Treehouse Obelisk Side 5", - "Treehouse Obelisk Side 6", - "Mountainside Obelisk Side 1", - "Mountainside Obelisk Side 2", - "Mountainside Obelisk Side 3", - "Mountainside Obelisk Side 4", - "Mountainside Obelisk Side 5", - "Mountainside Obelisk Side 6", - "Quarry Obelisk Side 1", - "Quarry Obelisk Side 2", - "Quarry Obelisk Side 3", - "Quarry Obelisk Side 4", - "Quarry Obelisk Side 5", - "Town Obelisk Side 1", - "Town Obelisk Side 2", - "Town Obelisk Side 3", - "Town Obelisk Side 4", - "Town Obelisk Side 5", - "Town Obelisk Side 6", - } - - ALL_LOCATIONS_TO_ID = dict() - - AREA_LOCATION_GROUPS = dict() - - @staticmethod - def get_id(chex: str): - """ - Calculates the location ID for any given location - """ - - return StaticWitnessLogic.ENTITIES_BY_HEX[chex]["id"] - - @staticmethod - def get_event_name(panel_hex: str): - """ - Returns the event name of any given panel. - """ - - action = " Opened" if StaticWitnessLogic.ENTITIES_BY_HEX[panel_hex]["entityType"] == "Door" else " Solved" - - return StaticWitnessLogic.ENTITIES_BY_HEX[panel_hex]["checkName"] + action - - def __init__(self): - all_loc_to_id = { - panel_obj["checkName"]: self.get_id(chex) - for chex, panel_obj in StaticWitnessLogic.ENTITIES_BY_HEX.items() - if panel_obj["id"] - } - - all_loc_to_id = dict( - sorted(all_loc_to_id.items(), key=lambda loc: loc[1]) - ) - - for key, item in all_loc_to_id.items(): - self.ALL_LOCATIONS_TO_ID[key] = item - - for loc in all_loc_to_id: - area = StaticWitnessLogic.ENTITIES_BY_NAME[loc]["area"]["name"] - self.AREA_LOCATION_GROUPS.setdefault(area, []).append(loc) - - class WitnessPlayerLocations: """ Class that defines locations for a single player """ - def __init__(self, world: "WitnessWorld", player_logic: WitnessPlayerLogic): + def __init__(self, world: "WitnessWorld", player_logic: WitnessPlayerLogic) -> None: """Defines locations AFTER logic changes due to options""" self.PANEL_TYPES_TO_SHUFFLE = {"General", "Laser"} - self.CHECK_LOCATIONS = StaticWitnessLocations.GENERAL_LOCATIONS.copy() + self.CHECK_LOCATIONS = static_witness_locations.GENERAL_LOCATIONS.copy() if world.options.shuffle_discarded_panels: self.PANEL_TYPES_TO_SHUFFLE.add("Discard") @@ -520,28 +33,28 @@ def __init__(self, world: "WitnessWorld", player_logic: WitnessPlayerLogic): elif world.options.shuffle_EPs == "obelisk_sides": self.PANEL_TYPES_TO_SHUFFLE.add("Obelisk Side") - for obelisk_loc in StaticWitnessLocations.OBELISK_SIDES: - obelisk_loc_hex = StaticWitnessLogic.ENTITIES_BY_NAME[obelisk_loc]["entity_hex"] + for obelisk_loc in static_witness_locations.OBELISK_SIDES: + obelisk_loc_hex = static_witness_logic.ENTITIES_BY_NAME[obelisk_loc]["entity_hex"] if player_logic.REQUIREMENTS_BY_HEX[obelisk_loc_hex] == frozenset({frozenset()}): self.CHECK_LOCATIONS.discard(obelisk_loc) self.CHECK_LOCATIONS = self.CHECK_LOCATIONS | player_logic.ADDED_CHECKS - self.CHECK_LOCATIONS.discard(StaticWitnessLogic.ENTITIES_BY_HEX[player_logic.VICTORY_LOCATION]["checkName"]) + self.CHECK_LOCATIONS.discard(static_witness_logic.ENTITIES_BY_HEX[player_logic.VICTORY_LOCATION]["checkName"]) self.CHECK_LOCATIONS = self.CHECK_LOCATIONS - { - StaticWitnessLogic.ENTITIES_BY_HEX[entity_hex]["checkName"] + static_witness_logic.ENTITIES_BY_HEX[entity_hex]["checkName"] for entity_hex in player_logic.COMPLETELY_DISABLED_ENTITIES | player_logic.PRECOMPLETED_LOCATIONS } self.CHECK_PANELHEX_TO_ID = { - StaticWitnessLogic.ENTITIES_BY_NAME[ch]["entity_hex"]: StaticWitnessLocations.ALL_LOCATIONS_TO_ID[ch] + static_witness_logic.ENTITIES_BY_NAME[ch]["entity_hex"]: static_witness_locations.ALL_LOCATIONS_TO_ID[ch] for ch in self.CHECK_LOCATIONS - if StaticWitnessLogic.ENTITIES_BY_NAME[ch]["entityType"] in self.PANEL_TYPES_TO_SHUFFLE + if static_witness_logic.ENTITIES_BY_NAME[ch]["entityType"] in self.PANEL_TYPES_TO_SHUFFLE } - dog_hex = StaticWitnessLogic.ENTITIES_BY_NAME["Town Pet the Dog"]["entity_hex"] - dog_id = StaticWitnessLocations.ALL_LOCATIONS_TO_ID["Town Pet the Dog"] + dog_hex = static_witness_logic.ENTITIES_BY_NAME["Town Pet the Dog"]["entity_hex"] + dog_id = static_witness_locations.ALL_LOCATIONS_TO_ID["Town Pet the Dog"] self.CHECK_PANELHEX_TO_ID[dog_hex] = dog_id self.CHECK_PANELHEX_TO_ID = dict( @@ -553,22 +66,19 @@ def __init__(self, world: "WitnessWorld", player_logic: WitnessPlayerLogic): } self.EVENT_LOCATION_TABLE = { - StaticWitnessLocations.get_event_name(panel_hex): None - for panel_hex in event_locations + static_witness_locations.get_event_name(entity_hex): None + for entity_hex in event_locations } check_dict = { - StaticWitnessLogic.ENTITIES_BY_HEX[location]["checkName"]: - StaticWitnessLocations.get_id(StaticWitnessLogic.ENTITIES_BY_HEX[location]["entity_hex"]) + static_witness_logic.ENTITIES_BY_HEX[location]["checkName"]: + static_witness_locations.get_id(static_witness_logic.ENTITIES_BY_HEX[location]["entity_hex"]) for location in self.CHECK_PANELHEX_TO_ID } self.CHECK_LOCATION_TABLE = {**self.EVENT_LOCATION_TABLE, **check_dict} - def add_location_late(self, entity_name: str): - entity_hex = StaticWitnessLogic.ENTITIES_BY_NAME[entity_name]["entity_hex"] + def add_location_late(self, entity_name: str) -> None: + entity_hex = static_witness_logic.ENTITIES_BY_NAME[entity_name]["entity_hex"] self.CHECK_LOCATION_TABLE[entity_hex] = entity_name - self.CHECK_PANELHEX_TO_ID[entity_hex] = StaticWitnessLocations.get_id(entity_hex) - - -StaticWitnessLocations() + self.CHECK_PANELHEX_TO_ID[entity_hex] = static_witness_locations.get_id(entity_hex) diff --git a/worlds/witness/options.py b/worlds/witness/options.py index b66308df432a..63f98faea456 100644 --- a/worlds/witness/options.py +++ b/worlds/witness/options.py @@ -1,10 +1,11 @@ from dataclasses import dataclass -from schema import Schema, And, Optional +from schema import And, Schema -from Options import Toggle, DefaultOnToggle, Range, Choice, PerGameCommonOptions, OptionDict +from Options import Choice, DefaultOnToggle, OptionDict, PerGameCommonOptions, Range, Toggle -from .static_logic import WeightedItemDefinition, ItemCategory, StaticWitnessLogic +from .data import static_logic as static_witness_logic +from .data.item_definition_classes import ItemCategory, WeightedItemDefinition class DisableNonRandomizedPuzzles(Toggle): @@ -232,12 +233,12 @@ class TrapWeights(OptionDict): display_name = "Trap Weights" schema = Schema({ trap_name: And(int, lambda n: n >= 0) - for trap_name, item_definition in StaticWitnessLogic.all_items.items() + for trap_name, item_definition in static_witness_logic.ALL_ITEMS.items() if isinstance(item_definition, WeightedItemDefinition) and item_definition.category is ItemCategory.TRAP }) default = { trap_name: item_definition.weight - for trap_name, item_definition in StaticWitnessLogic.all_items.items() + for trap_name, item_definition in static_witness_logic.ALL_ITEMS.items() if isinstance(item_definition, WeightedItemDefinition) and item_definition.category is ItemCategory.TRAP } @@ -315,7 +316,7 @@ class TheWitnessOptions(PerGameCommonOptions): shuffle_discarded_panels: ShuffleDiscardedPanels shuffle_vault_boxes: ShuffleVaultBoxes obelisk_keys: ObeliskKeys - shuffle_EPs: ShuffleEnvironmentalPuzzles + shuffle_EPs: ShuffleEnvironmentalPuzzles # noqa: N815 EP_difficulty: EnvironmentalPuzzlesDifficulty shuffle_postgame: ShufflePostgame victory_condition: VictoryCondition diff --git a/worlds/witness/items.py b/worlds/witness/player_items.py similarity index 66% rename from worlds/witness/items.py rename to worlds/witness/player_items.py index 6802fd2a21b5..925b21ae6de6 100644 --- a/worlds/witness/items.py +++ b/worlds/witness/player_items.py @@ -2,16 +2,23 @@ Defines progression, junk and event items for The Witness """ import copy - -from dataclasses import dataclass -from typing import Optional, Dict, List, Set, TYPE_CHECKING - -from BaseClasses import Item, MultiWorld, ItemClassification -from .locations import ID_START, WitnessPlayerLocations +from typing import TYPE_CHECKING, Dict, List, Set + +from BaseClasses import Item, ItemClassification, MultiWorld + +from .data import static_items as static_witness_items +from .data import static_logic as static_witness_logic +from .data.item_definition_classes import ( + DoorItemDefinition, + ItemCategory, + ItemData, + ItemDefinition, + ProgressiveItemDefinition, + WeightedItemDefinition, +) +from .data.utils import build_weighted_int_list +from .locations import WitnessPlayerLocations from .player_logic import WitnessPlayerLogic -from .static_logic import ItemDefinition, DoorItemDefinition, ProgressiveItemDefinition, ItemCategory, \ - StaticWitnessLogic, WeightedItemDefinition -from .utils import build_weighted_int_list if TYPE_CHECKING: from . import WitnessWorld @@ -19,17 +26,6 @@ NUM_ENERGY_UPGRADES = 4 -@dataclass() -class ItemData: - """ - ItemData for an item in The Witness - """ - ap_code: Optional[int] - definition: ItemDefinition - classification: ItemClassification - local_only: bool = False - - class WitnessItem(Item): """ Item from the game The Witness @@ -37,79 +33,30 @@ class WitnessItem(Item): game: str = "The Witness" -class StaticWitnessItems: - """ - Class that handles Witness items independent of world settings - """ - item_data: Dict[str, ItemData] = {} - item_groups: Dict[str, List[str]] = {} - - # Useful items that are treated specially at generation time and should not be automatically added to the player's - # item list during get_progression_items. - special_usefuls: List[str] = ["Puzzle Skip"] - - def __init__(self): - for item_name, definition in StaticWitnessLogic.all_items.items(): - ap_item_code = definition.local_code + ID_START - classification: ItemClassification = ItemClassification.filler - local_only: bool = False - - if definition.category is ItemCategory.SYMBOL: - classification = ItemClassification.progression - StaticWitnessItems.item_groups.setdefault("Symbols", []).append(item_name) - elif definition.category is ItemCategory.DOOR: - classification = ItemClassification.progression - StaticWitnessItems.item_groups.setdefault("Doors", []).append(item_name) - elif definition.category is ItemCategory.LASER: - classification = ItemClassification.progression_skip_balancing - StaticWitnessItems.item_groups.setdefault("Lasers", []).append(item_name) - elif definition.category is ItemCategory.USEFUL: - classification = ItemClassification.useful - elif definition.category is ItemCategory.FILLER: - if item_name in ["Energy Fill (Small)"]: - local_only = True - classification = ItemClassification.filler - elif definition.category is ItemCategory.TRAP: - classification = ItemClassification.trap - elif definition.category is ItemCategory.JOKE: - classification = ItemClassification.filler - - StaticWitnessItems.item_data[item_name] = ItemData(ap_item_code, definition, - classification, local_only) - - @staticmethod - def get_item_to_door_mappings() -> Dict[int, List[int]]: - output: Dict[int, List[int]] = {} - for item_name, item_data in {name: data for name, data in StaticWitnessItems.item_data.items() - if isinstance(data.definition, DoorItemDefinition)}.items(): - item = StaticWitnessItems.item_data[item_name] - output[item.ap_code] = [int(hex_string, 16) for hex_string in item_data.definition.panel_id_hexes] - return output - - class WitnessPlayerItems: """ Class that defines Items for a single world """ - def __init__(self, world: "WitnessWorld", logic: WitnessPlayerLogic, locat: WitnessPlayerLocations): + def __init__(self, world: "WitnessWorld", player_logic: WitnessPlayerLogic, + player_locations: WitnessPlayerLocations) -> None: """Adds event items after logic changes due to options""" self._world: "WitnessWorld" = world self._multiworld: MultiWorld = world.multiworld self._player_id: int = world.player - self._logic: WitnessPlayerLogic = logic - self._locations: WitnessPlayerLocations = locat + self._logic: WitnessPlayerLogic = player_logic + self._locations: WitnessPlayerLocations = player_locations # Duplicate the static item data, then make any player-specific adjustments to classification. - self.item_data: Dict[str, ItemData] = copy.deepcopy(StaticWitnessItems.item_data) + self.item_data: Dict[str, ItemData] = copy.deepcopy(static_witness_items.ITEM_DATA) # Remove all progression items that aren't actually in the game. self.item_data = { name: data for (name, data) in self.item_data.items() if data.classification not in - {ItemClassification.progression, ItemClassification.progression_skip_balancing} - or name in logic.PROG_ITEMS_ACTUALLY_IN_THE_GAME + {ItemClassification.progression, ItemClassification.progression_skip_balancing} + or name in player_logic.PROG_ITEMS_ACTUALLY_IN_THE_GAME } # Downgrade door items @@ -138,7 +85,7 @@ def __init__(self, world: "WitnessWorld", logic: WitnessPlayerLogic, locat: Witn # Add setting-specific useful items to the mandatory item list. for item_name, item_data in {name: data for (name, data) in self.item_data.items() if data.classification == ItemClassification.useful}.items(): - if item_name in StaticWitnessItems.special_usefuls: + if item_name in static_witness_items._special_usefuls: continue elif item_name == "Energy Capacity": self._mandatory_items[item_name] = NUM_ENERGY_UPGRADES @@ -149,7 +96,7 @@ def __init__(self, world: "WitnessWorld", logic: WitnessPlayerLogic, locat: Witn # Add event items to the item definition list for later lookup. for event_location in self._locations.EVENT_LOCATION_TABLE: - location_name = logic.EVENT_ITEM_PAIRS[event_location] + location_name = player_logic.EVENT_ITEM_PAIRS[event_location] self.item_data[location_name] = ItemData(None, ItemDefinition(0, ItemCategory.EVENT), ItemClassification.progression, False) @@ -219,7 +166,7 @@ def get_early_items(self) -> List[str]: output.add("Triangles") # Replace progressive items with their parents. - output = {StaticWitnessLogic.get_parent_progressive_item(item) for item in output} + output = {static_witness_logic.get_parent_progressive_item(item) for item in output} # Remove items that are mentioned in any plando options. (Hopefully, in the future, plando will get resolved # before create_items so that we'll be able to check placed items instead of just removing all items mentioned @@ -227,16 +174,16 @@ def get_early_items(self) -> List[str]: for plando_setting in self._multiworld.plando_items[self._player_id]: if plando_setting.get("from_pool", True): for item_setting_key in [key for key in ["item", "items"] if key in plando_setting]: - if type(plando_setting[item_setting_key]) is str: + if isinstance(plando_setting[item_setting_key], str): output -= {plando_setting[item_setting_key]} - elif type(plando_setting[item_setting_key]) is dict: + elif isinstance(plando_setting[item_setting_key], dict): output -= {item for item, weight in plando_setting[item_setting_key].items() if weight} else: # Assume this is some other kind of iterable. for inner_item in plando_setting[item_setting_key]: - if type(inner_item) is str: + if isinstance(inner_item, str): output -= {inner_item} - elif type(inner_item) is dict: + elif isinstance(inner_item, dict): output -= {item for item, weight in inner_item.items() if weight} # Sort the output for consistency across versions if the implementation changes but the logic does not. @@ -257,7 +204,7 @@ def get_symbol_ids_not_in_pool(self) -> List[int]: """ Returns the item IDs of symbol items that were defined in the configuration file but are not in the pool. """ - return [data.ap_code for name, data in StaticWitnessItems.item_data.items() + return [data.ap_code for name, data in static_witness_items.ITEM_DATA.items() if name not in self.item_data.keys() and data.definition.category is ItemCategory.SYMBOL] def get_progressive_item_ids_in_pool(self) -> Dict[int, List[int]]: @@ -267,9 +214,8 @@ def get_progressive_item_ids_in_pool(self) -> Dict[int, List[int]]: if isinstance(item.definition, ProgressiveItemDefinition): # Note: we need to reference the static table here rather than the player-specific one because the child # items were removed from the pool when we pruned out all progression items not in the settings. - output[item.ap_code] = [StaticWitnessItems.item_data[child_item].ap_code + output[item.ap_code] = [static_witness_items.ITEM_DATA[child_item].ap_code for child_item in item.definition.child_item_names] return output -StaticWitnessItems() diff --git a/worlds/witness/player_logic.py b/worlds/witness/player_logic.py index 6bc263b9cc68..01caee89515b 100644 --- a/worlds/witness/player_logic.py +++ b/worlds/witness/player_logic.py @@ -17,11 +17,13 @@ import copy from collections import defaultdict -from typing import cast, TYPE_CHECKING +from functools import lru_cache from logging import warning +from typing import TYPE_CHECKING, Dict, FrozenSet, List, Set, Tuple, cast -from .static_logic import StaticWitnessLogic, DoorItemDefinition, ItemCategory, ProgressiveItemDefinition -from .utils import * +from .data import static_logic as static_witness_logic +from .data import utils +from .data.item_definition_classes import DoorItemDefinition, ItemCategory, ProgressiveItemDefinition if TYPE_CHECKING: from . import WitnessWorld @@ -31,7 +33,7 @@ class WitnessPlayerLogic: """WITNESS LOGIC CLASS""" @lru_cache(maxsize=None) - def reduce_req_within_region(self, panel_hex: str) -> FrozenSet[FrozenSet[str]]: + def reduce_req_within_region(self, entity_hex: str) -> FrozenSet[FrozenSet[str]]: """ Panels in this game often only turn on when other panels are solved. Those other panels may have different item requirements. @@ -40,15 +42,15 @@ def reduce_req_within_region(self, panel_hex: str) -> FrozenSet[FrozenSet[str]]: Panels outside of the same region will still be checked manually. """ - if panel_hex in self.COMPLETELY_DISABLED_ENTITIES or panel_hex in self.IRRELEVANT_BUT_NOT_DISABLED_ENTITIES: + if entity_hex in self.COMPLETELY_DISABLED_ENTITIES or entity_hex in self.IRRELEVANT_BUT_NOT_DISABLED_ENTITIES: return frozenset() - entity_obj = self.REFERENCE_LOGIC.ENTITIES_BY_HEX[panel_hex] + entity_obj = self.REFERENCE_LOGIC.ENTITIES_BY_HEX[entity_hex] these_items = frozenset({frozenset()}) if entity_obj["id"]: - these_items = self.DEPENDENT_REQUIREMENTS_BY_HEX[panel_hex]["items"] + these_items = self.DEPENDENT_REQUIREMENTS_BY_HEX[entity_hex]["items"] these_items = frozenset({ subset.intersection(self.THEORETICAL_ITEMS_NO_MULTI) @@ -58,28 +60,28 @@ def reduce_req_within_region(self, panel_hex: str) -> FrozenSet[FrozenSet[str]]: for subset in these_items: self.PROG_ITEMS_ACTUALLY_IN_THE_GAME_NO_MULTI.update(subset) - these_panels = self.DEPENDENT_REQUIREMENTS_BY_HEX[panel_hex]["panels"] + these_panels = self.DEPENDENT_REQUIREMENTS_BY_HEX[entity_hex]["panels"] - if panel_hex in self.DOOR_ITEMS_BY_ID: - door_items = frozenset({frozenset([item]) for item in self.DOOR_ITEMS_BY_ID[panel_hex]}) + if entity_hex in self.DOOR_ITEMS_BY_ID: + door_items = frozenset({frozenset([item]) for item in self.DOOR_ITEMS_BY_ID[entity_hex]}) all_options: Set[FrozenSet[str]] = set() - for dependentItem in door_items: - self.PROG_ITEMS_ACTUALLY_IN_THE_GAME_NO_MULTI.update(dependentItem) + for dependent_item in door_items: + self.PROG_ITEMS_ACTUALLY_IN_THE_GAME_NO_MULTI.update(dependent_item) for items_option in these_items: - all_options.add(items_option.union(dependentItem)) + all_options.add(items_option.union(dependent_item)) # If this entity is not an EP, and it has an associated door item, ignore the original power dependencies - if StaticWitnessLogic.ENTITIES_BY_HEX[panel_hex]["entityType"] != "EP": + if static_witness_logic.ENTITIES_BY_HEX[entity_hex]["entityType"] != "EP": # 0x28A0D depends on another entity for *non-power* reasons -> This dependency needs to be preserved, # except in Expert, where that dependency doesn't exist, but now there *is* a power dependency. # In the future, it'd be wise to make a distinction between "power dependencies" and other dependencies. - if panel_hex == "0x28A0D" and not any("0x28998" in option for option in these_panels): + if entity_hex == "0x28A0D" and not any("0x28998" in option for option in these_panels): these_items = all_options # Another dependency that is not power-based: The Symmetry Island Upper Panel latches - elif panel_hex == "0x1C349": + elif entity_hex == "0x1C349": these_items = all_options else: @@ -107,9 +109,9 @@ def reduce_req_within_region(self, panel_hex: str) -> FrozenSet[FrozenSet[str]]: if option_entity in self.ALWAYS_EVENT_NAMES_BY_HEX: new_items = frozenset({frozenset([option_entity])}) - elif (panel_hex, option_entity) in self.CONDITIONAL_EVENTS: + elif (entity_hex, option_entity) in self.CONDITIONAL_EVENTS: new_items = frozenset({frozenset([option_entity])}) - self.USED_EVENT_NAMES_BY_HEX[option_entity] = self.CONDITIONAL_EVENTS[(panel_hex, option_entity)] + self.USED_EVENT_NAMES_BY_HEX[option_entity] = self.CONDITIONAL_EVENTS[(entity_hex, option_entity)] elif option_entity in {"7 Lasers", "11 Lasers", "7 Lasers + Redirect", "11 Lasers + Redirect", "PP2 Weirdness", "Theater to Tunnels"}: new_items = frozenset({frozenset([option_entity])}) @@ -121,36 +123,36 @@ def reduce_req_within_region(self, panel_hex: str) -> FrozenSet[FrozenSet[str]]: for possibility in new_items ) - dependent_items_for_option = dnf_and([dependent_items_for_option, new_items]) + dependent_items_for_option = utils.dnf_and([dependent_items_for_option, new_items]) for items_option in these_items: - for dependentItem in dependent_items_for_option: - all_options.add(items_option.union(dependentItem)) + for dependent_item in dependent_items_for_option: + all_options.add(items_option.union(dependent_item)) - return dnf_remove_redundancies(frozenset(all_options)) + return utils.dnf_remove_redundancies(frozenset(all_options)) - def make_single_adjustment(self, adj_type: str, line: str): - from . import StaticWitnessItems + def make_single_adjustment(self, adj_type: str, line: str) -> None: + from .data import static_items as static_witness_items """Makes a single logic adjustment based on additional logic file""" if adj_type == "Items": line_split = line.split(" - ") item_name = line_split[0] - if item_name not in StaticWitnessItems.item_data: - raise RuntimeError("Item \"" + item_name + "\" does not exist.") + if item_name not in static_witness_items.ITEM_DATA: + raise RuntimeError(f'Item "{item_name}" does not exist.') self.THEORETICAL_ITEMS.add(item_name) - if isinstance(StaticWitnessLogic.all_items[item_name], ProgressiveItemDefinition): + if isinstance(static_witness_logic.ALL_ITEMS[item_name], ProgressiveItemDefinition): self.THEORETICAL_ITEMS_NO_MULTI.update(cast(ProgressiveItemDefinition, - StaticWitnessLogic.all_items[item_name]).child_item_names) + static_witness_logic.ALL_ITEMS[item_name]).child_item_names) else: self.THEORETICAL_ITEMS_NO_MULTI.add(item_name) - if StaticWitnessLogic.all_items[item_name].category in [ItemCategory.DOOR, ItemCategory.LASER]: - panel_hexes = cast(DoorItemDefinition, StaticWitnessLogic.all_items[item_name]).panel_id_hexes - for panel_hex in panel_hexes: - self.DOOR_ITEMS_BY_ID.setdefault(panel_hex, []).append(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 + for entity_hex in entity_hexes: + self.DOOR_ITEMS_BY_ID.setdefault(entity_hex, []).append(item_name) return @@ -158,18 +160,18 @@ def make_single_adjustment(self, adj_type: str, line: str): item_name = line self.THEORETICAL_ITEMS.discard(item_name) - if isinstance(StaticWitnessLogic.all_items[item_name], ProgressiveItemDefinition): + if isinstance(static_witness_logic.ALL_ITEMS[item_name], ProgressiveItemDefinition): self.THEORETICAL_ITEMS_NO_MULTI.difference_update( - cast(ProgressiveItemDefinition, StaticWitnessLogic.all_items[item_name]).child_item_names + cast(ProgressiveItemDefinition, static_witness_logic.ALL_ITEMS[item_name]).child_item_names ) else: self.THEORETICAL_ITEMS_NO_MULTI.discard(item_name) - if StaticWitnessLogic.all_items[item_name].category in [ItemCategory.DOOR, ItemCategory.LASER]: - panel_hexes = cast(DoorItemDefinition, StaticWitnessLogic.all_items[item_name]).panel_id_hexes - for panel_hex in panel_hexes: - if panel_hex in self.DOOR_ITEMS_BY_ID and item_name in self.DOOR_ITEMS_BY_ID[panel_hex]: - self.DOOR_ITEMS_BY_ID[panel_hex].remove(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 + for entity_hex in entity_hexes: + if entity_hex in self.DOOR_ITEMS_BY_ID and item_name in self.DOOR_ITEMS_BY_ID[entity_hex]: + self.DOOR_ITEMS_BY_ID[entity_hex].remove(item_name) if adj_type == "Starting Inventory": self.STARTING_INVENTORY.add(line) @@ -189,13 +191,13 @@ def make_single_adjustment(self, adj_type: str, line: str): line_split = line.split(" - ") requirement = { - "panels": parse_lambda(line_split[1]), + "panels": utils.parse_lambda(line_split[1]), } if len(line_split) > 2: - required_items = parse_lambda(line_split[2]) + required_items = utils.parse_lambda(line_split[2]) items_actually_in_the_game = [ - item_name for item_name, item_definition in StaticWitnessLogic.all_items.items() + item_name for item_name, item_definition in static_witness_logic.ALL_ITEMS.items() if item_definition.category is ItemCategory.SYMBOL ] required_items = frozenset( @@ -210,21 +212,21 @@ def make_single_adjustment(self, adj_type: str, line: str): return if adj_type == "Disabled Locations": - panel_hex = line[:7] + entity_hex = line[:7] - self.COMPLETELY_DISABLED_ENTITIES.add(panel_hex) + self.COMPLETELY_DISABLED_ENTITIES.add(entity_hex) return if adj_type == "Irrelevant Locations": - panel_hex = line[:7] + entity_hex = line[:7] - self.IRRELEVANT_BUT_NOT_DISABLED_ENTITIES.add(panel_hex) + self.IRRELEVANT_BUT_NOT_DISABLED_ENTITIES.add(entity_hex) return if adj_type == "Region Changes": - new_region_and_options = define_new_region(line + ":") + new_region_and_options = utils.define_new_region(line + ":") self.CONNECTIONS_BY_REGION_NAME[new_region_and_options[0]["name"]] = new_region_and_options[1] @@ -245,11 +247,11 @@ def make_single_adjustment(self, adj_type: str, line: str): (target_region, frozenset({frozenset(["TrueOneWay"])})) ) else: - new_lambda = connection[1] | parse_lambda(panel_set_string) + new_lambda = connection[1] | utils.parse_lambda(panel_set_string) self.CONNECTIONS_BY_REGION_NAME[source_region].add((target_region, new_lambda)) break else: # Execute if loop did not break. TIL this is a thing you can do! - new_conn = (target_region, parse_lambda(panel_set_string)) + new_conn = (target_region, utils.parse_lambda(panel_set_string)) self.CONNECTIONS_BY_REGION_NAME[source_region].add(new_conn) if adj_type == "Added Locations": @@ -258,7 +260,7 @@ def make_single_adjustment(self, adj_type: str, line: str): self.ADDED_CHECKS.add(line) @staticmethod - def handle_postgame(world: "WitnessWorld"): + def handle_postgame(world: "WitnessWorld") -> List[List[str]]: # In shuffle_postgame, panels that become accessible "after or at the same time as the goal" are disabled. # This has a lot of complicated considerations, which I'll try my best to explain. postgame_adjustments = [] @@ -285,29 +287,29 @@ def handle_postgame(world: "WitnessWorld"): # Caves & Challenge should never have anything if doors are vanilla - definitionally "post-game" # This is technically imprecise, but it matches player expectations better. if not (early_caves or doors): - postgame_adjustments.append(get_caves_exclusion_list()) - postgame_adjustments.append(get_beyond_challenge_exclusion_list()) + postgame_adjustments.append(utils.get_caves_exclusion_list()) + postgame_adjustments.append(utils.get_beyond_challenge_exclusion_list()) # If Challenge is the goal, some panels on the way need to be left on, as well as Challenge Vault box itself if not victory == "challenge": - postgame_adjustments.append(get_path_to_challenge_exclusion_list()) - postgame_adjustments.append(get_challenge_vault_box_exclusion_list()) + postgame_adjustments.append(utils.get_path_to_challenge_exclusion_list()) + postgame_adjustments.append(utils.get_challenge_vault_box_exclusion_list()) # Challenge can only have something if the goal is not challenge or longbox itself. # In case of shortbox, it'd have to be a "reverse shortbox" situation where shortbox requires *more* lasers. # In that case, it'd also have to be a doors mode, but that's already covered by the previous block. if not (victory == "elevator" or reverse_shortbox_goal): - postgame_adjustments.append(get_beyond_challenge_exclusion_list()) + postgame_adjustments.append(utils.get_beyond_challenge_exclusion_list()) if not victory == "challenge": - postgame_adjustments.append(get_challenge_vault_box_exclusion_list()) + postgame_adjustments.append(utils.get_challenge_vault_box_exclusion_list()) # Mountain can't be reached if the goal is shortbox (or "reverse long box") if not mountain_enterable_from_top: - postgame_adjustments.append(get_mountain_upper_exclusion_list()) + postgame_adjustments.append(utils.get_mountain_upper_exclusion_list()) # Same goes for lower mountain, but that one *can* be reached in remote doors modes. if not doors: - postgame_adjustments.append(get_mountain_lower_exclusion_list()) + postgame_adjustments.append(utils.get_mountain_lower_exclusion_list()) # The Mountain Bottom Floor Discard is a bit complicated, so we handle it separately. ("it" == the Discard) # In Elevator Goal, it is definitionally in the post-game, unless remote doors is played. @@ -319,15 +321,15 @@ def handle_postgame(world: "WitnessWorld"): # This has different consequences depending on whether remote doors is being played. # If doors are vanilla, Bottom Floor Discard locks a door to an area, which has to be disabled as well. if doors: - postgame_adjustments.append(get_bottom_floor_discard_exclusion_list()) + postgame_adjustments.append(utils.get_bottom_floor_discard_exclusion_list()) else: - postgame_adjustments.append(get_bottom_floor_discard_nondoors_exclusion_list()) + postgame_adjustments.append(utils.get_bottom_floor_discard_nondoors_exclusion_list()) # In Challenge goal + early_caves + vanilla doors, you could find something important on Bottom Floor Discard, # including the Caves Shortcuts themselves if playing "early_caves: start_inventory". # This is another thing that was deemed "unfun" more than fitting the actual definition of post-game. if victory == "challenge" and early_caves and not doors: - postgame_adjustments.append(get_bottom_floor_discard_nondoors_exclusion_list()) + postgame_adjustments.append(utils.get_bottom_floor_discard_nondoors_exclusion_list()) # If we have a proper short box goal, long box will never be activated first. if proper_shortbox_goal: @@ -335,7 +337,7 @@ def handle_postgame(world: "WitnessWorld"): return postgame_adjustments - def make_options_adjustments(self, world: "WitnessWorld"): + def make_options_adjustments(self, world: "WitnessWorld") -> None: """Makes logic adjustments based on options""" adjustment_linesets_in_order = [] @@ -356,15 +358,15 @@ def make_options_adjustments(self, world: "WitnessWorld"): # In disable_non_randomized, the discards are needed for alternate activation triggers, UNLESS both # (remote) doors and lasers are shuffled. if not world.options.disable_non_randomized_puzzles or (doors and lasers): - adjustment_linesets_in_order.append(get_discard_exclusion_list()) + adjustment_linesets_in_order.append(utils.get_discard_exclusion_list()) if doors: - adjustment_linesets_in_order.append(get_bottom_floor_discard_exclusion_list()) + adjustment_linesets_in_order.append(utils.get_bottom_floor_discard_exclusion_list()) if not world.options.shuffle_vault_boxes: - adjustment_linesets_in_order.append(get_vault_exclusion_list()) + adjustment_linesets_in_order.append(utils.get_vault_exclusion_list()) if not victory == "challenge": - adjustment_linesets_in_order.append(get_challenge_vault_box_exclusion_list()) + adjustment_linesets_in_order.append(utils.get_challenge_vault_box_exclusion_list()) # Victory Condition @@ -387,54 +389,54 @@ def make_options_adjustments(self, world: "WitnessWorld"): ]) if world.options.disable_non_randomized_puzzles: - adjustment_linesets_in_order.append(get_disable_unrandomized_list()) + adjustment_linesets_in_order.append(utils.get_disable_unrandomized_list()) if world.options.shuffle_symbols: - adjustment_linesets_in_order.append(get_symbol_shuffle_list()) + adjustment_linesets_in_order.append(utils.get_symbol_shuffle_list()) if world.options.EP_difficulty == "normal": - adjustment_linesets_in_order.append(get_ep_easy()) + adjustment_linesets_in_order.append(utils.get_ep_easy()) elif world.options.EP_difficulty == "tedious": - adjustment_linesets_in_order.append(get_ep_no_eclipse()) + adjustment_linesets_in_order.append(utils.get_ep_no_eclipse()) if world.options.door_groupings == "regional": if world.options.shuffle_doors == "panels": - adjustment_linesets_in_order.append(get_simple_panels()) + adjustment_linesets_in_order.append(utils.get_simple_panels()) elif world.options.shuffle_doors == "doors": - adjustment_linesets_in_order.append(get_simple_doors()) + adjustment_linesets_in_order.append(utils.get_simple_doors()) elif world.options.shuffle_doors == "mixed": - adjustment_linesets_in_order.append(get_simple_doors()) - adjustment_linesets_in_order.append(get_simple_additional_panels()) + adjustment_linesets_in_order.append(utils.get_simple_doors()) + adjustment_linesets_in_order.append(utils.get_simple_additional_panels()) else: if world.options.shuffle_doors == "panels": - adjustment_linesets_in_order.append(get_complex_door_panels()) - adjustment_linesets_in_order.append(get_complex_additional_panels()) + adjustment_linesets_in_order.append(utils.get_complex_door_panels()) + adjustment_linesets_in_order.append(utils.get_complex_additional_panels()) elif world.options.shuffle_doors == "doors": - adjustment_linesets_in_order.append(get_complex_doors()) + adjustment_linesets_in_order.append(utils.get_complex_doors()) elif world.options.shuffle_doors == "mixed": - adjustment_linesets_in_order.append(get_complex_doors()) - adjustment_linesets_in_order.append(get_complex_additional_panels()) + adjustment_linesets_in_order.append(utils.get_complex_doors()) + adjustment_linesets_in_order.append(utils.get_complex_additional_panels()) if world.options.shuffle_boat: - adjustment_linesets_in_order.append(get_boat()) + adjustment_linesets_in_order.append(utils.get_boat()) if world.options.early_caves == "starting_inventory": - adjustment_linesets_in_order.append(get_early_caves_start_list()) + adjustment_linesets_in_order.append(utils.get_early_caves_start_list()) if world.options.early_caves == "add_to_pool" and not doors: - adjustment_linesets_in_order.append(get_early_caves_list()) + adjustment_linesets_in_order.append(utils.get_early_caves_list()) if world.options.elevators_come_to_you: - adjustment_linesets_in_order.append(get_elevators_come_to_you()) + adjustment_linesets_in_order.append(utils.get_elevators_come_to_you()) for item in self.YAML_ADDED_ITEMS: adjustment_linesets_in_order.append(["Items:", item]) if lasers: - adjustment_linesets_in_order.append(get_laser_shuffle()) + adjustment_linesets_in_order.append(utils.get_laser_shuffle()) if world.options.shuffle_EPs and world.options.obelisk_keys: - adjustment_linesets_in_order.append(get_obelisk_keys()) + adjustment_linesets_in_order.append(utils.get_obelisk_keys()) if world.options.shuffle_EPs == "obelisk_sides": ep_gen = ((ep_hex, ep_obj) for (ep_hex, ep_obj) in self.REFERENCE_LOGIC.ENTITIES_BY_HEX.items() @@ -446,10 +448,10 @@ def make_options_adjustments(self, world: "WitnessWorld"): ep_name = self.REFERENCE_LOGIC.ENTITIES_BY_HEX[ep_hex]["checkName"] self.ALWAYS_EVENT_NAMES_BY_HEX[ep_hex] = f"{obelisk_name} - {ep_name}" else: - adjustment_linesets_in_order.append(["Disabled Locations:"] + get_ep_obelisks()[1:]) + adjustment_linesets_in_order.append(["Disabled Locations:"] + utils.get_ep_obelisks()[1:]) if not world.options.shuffle_EPs: - adjustment_linesets_in_order.append(["Disabled Locations:"] + get_ep_all_individual()[1:]) + adjustment_linesets_in_order.append(["Disabled Locations:"] + utils.get_ep_all_individual()[1:]) for yaml_disabled_location in self.YAML_DISABLED_LOCATIONS: if yaml_disabled_location not in self.REFERENCE_LOGIC.ENTITIES_BY_NAME: @@ -480,7 +482,7 @@ def make_options_adjustments(self, world: "WitnessWorld"): if entity_id in self.DOOR_ITEMS_BY_ID: del self.DOOR_ITEMS_BY_ID[entity_id] - def make_dependency_reduced_checklist(self): + def make_dependency_reduced_checklist(self) -> None: """ Turns dependent check set into semi-independent check set """ @@ -492,10 +494,10 @@ def make_dependency_reduced_checklist(self): for item in self.PROG_ITEMS_ACTUALLY_IN_THE_GAME_NO_MULTI: if item not in self.THEORETICAL_ITEMS: - progressive_item_name = StaticWitnessLogic.get_parent_progressive_item(item) + progressive_item_name = static_witness_logic.get_parent_progressive_item(item) self.PROG_ITEMS_ACTUALLY_IN_THE_GAME.add(progressive_item_name) child_items = cast(ProgressiveItemDefinition, - StaticWitnessLogic.all_items[progressive_item_name]).child_item_names + 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 @@ -520,24 +522,24 @@ def make_dependency_reduced_checklist(self): if self.REFERENCE_LOGIC.ENTITIES_BY_HEX[entity]["region"]: region_name = self.REFERENCE_LOGIC.ENTITIES_BY_HEX[entity]["region"]["name"] - entity_req = dnf_and([entity_req, frozenset({frozenset({region_name})})]) + entity_req = utils.dnf_and([entity_req, frozenset({frozenset({region_name})})]) individual_entity_requirements.append(entity_req) - overall_requirement |= dnf_and(individual_entity_requirements) + overall_requirement |= utils.dnf_and(individual_entity_requirements) new_connections.append((connection[0], overall_requirement)) self.CONNECTIONS_BY_REGION_NAME[region] = new_connections - def solvability_guaranteed(self, entity_hex: str): + def solvability_guaranteed(self, entity_hex: str) -> bool: return not ( entity_hex in self.ENTITIES_WITHOUT_ENSURED_SOLVABILITY or entity_hex in self.COMPLETELY_DISABLED_ENTITIES or entity_hex in self.IRRELEVANT_BUT_NOT_DISABLED_ENTITIES ) - def determine_unrequired_entities(self, world: "WitnessWorld"): + def determine_unrequired_entities(self, world: "WitnessWorld") -> None: """Figure out which major items are actually useless in this world's settings""" # Gather quick references to relevant options @@ -596,7 +598,7 @@ def determine_unrequired_entities(self, world: "WitnessWorld"): item_name for item_name, is_required in is_item_required_dict.items() if not is_required } - def make_event_item_pair(self, panel: str): + def make_event_item_pair(self, panel: str) -> Tuple[str, str]: """ Makes a pair of an event panel and its event item """ @@ -604,12 +606,12 @@ def make_event_item_pair(self, panel: str): name = self.REFERENCE_LOGIC.ENTITIES_BY_HEX[panel]["checkName"] + action if panel not in self.USED_EVENT_NAMES_BY_HEX: - warning("Panel \"" + name + "\" does not have an associated event name.") + warning(f'Panel "{name}" does not have an associated event name.') self.USED_EVENT_NAMES_BY_HEX[panel] = name + " Event" pair = (name, self.USED_EVENT_NAMES_BY_HEX[panel]) return pair - def make_event_panel_lists(self): + def make_event_panel_lists(self) -> None: self.ALWAYS_EVENT_NAMES_BY_HEX[self.VICTORY_LOCATION] = "Victory" self.USED_EVENT_NAMES_BY_HEX.update(self.ALWAYS_EVENT_NAMES_BY_HEX) @@ -623,7 +625,7 @@ def make_event_panel_lists(self): pair = self.make_event_item_pair(panel) self.EVENT_ITEM_PAIRS[pair[0]] = pair[1] - def __init__(self, world: "WitnessWorld", disabled_locations: Set[str], start_inv: Dict[str, int]): + def __init__(self, world: "WitnessWorld", disabled_locations: Set[str], start_inv: Dict[str, int]) -> None: self.YAML_DISABLED_LOCATIONS = disabled_locations self.YAML_ADDED_ITEMS = start_inv @@ -646,11 +648,11 @@ def __init__(self, world: "WitnessWorld", disabled_locations: Set[str], start_in self.DIFFICULTY = world.options.puzzle_randomization if self.DIFFICULTY == "sigma_normal": - self.REFERENCE_LOGIC = StaticWitnessLogic.sigma_normal + self.REFERENCE_LOGIC = static_witness_logic.sigma_normal elif self.DIFFICULTY == "sigma_expert": - self.REFERENCE_LOGIC = StaticWitnessLogic.sigma_expert + self.REFERENCE_LOGIC = static_witness_logic.sigma_expert elif self.DIFFICULTY == "none": - self.REFERENCE_LOGIC = StaticWitnessLogic.vanilla + self.REFERENCE_LOGIC = static_witness_logic.vanilla self.CONNECTIONS_BY_REGION_NAME = copy.deepcopy(self.REFERENCE_LOGIC.STATIC_CONNECTIONS_BY_REGION_NAME) self.DEPENDENT_REQUIREMENTS_BY_HEX = copy.deepcopy(self.REFERENCE_LOGIC.STATIC_DEPENDENT_REQUIREMENTS_BY_HEX) diff --git a/worlds/witness/regions.py b/worlds/witness/regions.py index 350017c6943a..e1f0ddb2161f 100644 --- a/worlds/witness/regions.py +++ b/worlds/witness/regions.py @@ -2,26 +2,29 @@ Defines Region for The Witness, assigns locations to them, and connects them with the proper requirements """ -from typing import FrozenSet, TYPE_CHECKING, Dict, Tuple, List +from collections import defaultdict +from typing import TYPE_CHECKING, Dict, FrozenSet, List, Tuple from BaseClasses import Entrance, Region -from Utils import KeyedDefaultDict -from .static_logic import StaticWitnessLogic -from .locations import WitnessPlayerLocations, StaticWitnessLocations + +from worlds.generic.Rules import CollectionRule + +from .data import static_logic as static_witness_logic +from .locations import WitnessPlayerLocations, static_witness_locations from .player_logic import WitnessPlayerLogic if TYPE_CHECKING: from . import WitnessWorld -class WitnessRegions: +class WitnessPlayerRegions: """Class that defines Witness Regions""" - locat = None + player_locations = None logic = None @staticmethod - def make_lambda(item_requirement: FrozenSet[FrozenSet[str]], world: "WitnessWorld"): + def make_lambda(item_requirement: FrozenSet[FrozenSet[str]], world: "WitnessWorld") -> CollectionRule: from .rules import _meets_item_requirements """ @@ -82,7 +85,7 @@ def connect_if_possible(self, world: "WitnessWorld", source: str, target: str, r for dependent_region in mentioned_regions: world.multiworld.register_indirect_condition(regions_by_name[dependent_region], connection) - def create_regions(self, world: "WitnessWorld", player_logic: WitnessPlayerLogic): + def create_regions(self, world: "WitnessWorld", player_logic: WitnessPlayerLogic) -> None: """ Creates all the regions for The Witness """ @@ -94,16 +97,17 @@ def create_regions(self, world: "WitnessWorld", player_logic: WitnessPlayerLogic for region_name, region in self.reference_logic.ALL_REGIONS_BY_NAME.items(): locations_for_this_region = [ self.reference_logic.ENTITIES_BY_HEX[panel]["checkName"] for panel in region["panels"] - if self.reference_logic.ENTITIES_BY_HEX[panel]["checkName"] in self.locat.CHECK_LOCATION_TABLE + if self.reference_logic.ENTITIES_BY_HEX[panel]["checkName"] + in self.player_locations.CHECK_LOCATION_TABLE ] locations_for_this_region += [ - StaticWitnessLocations.get_event_name(panel) for panel in region["panels"] - if StaticWitnessLocations.get_event_name(panel) in self.locat.EVENT_LOCATION_TABLE + static_witness_locations.get_event_name(panel) for panel in region["panels"] + if static_witness_locations.get_event_name(panel) in self.player_locations.EVENT_LOCATION_TABLE ] all_locations = all_locations | set(locations_for_this_region) - new_region = create_region(world, region_name, self.locat, locations_for_this_region) + new_region = create_region(world, region_name, self.player_locations, locations_for_this_region) regions_by_name[region_name] = new_region @@ -133,16 +137,16 @@ def create_regions(self, world: "WitnessWorld", player_logic: WitnessPlayerLogic world.multiworld.regions += self.created_regions.values() - def __init__(self, locat: WitnessPlayerLocations, world: "WitnessWorld"): + def __init__(self, player_locations: WitnessPlayerLocations, world: "WitnessWorld") -> None: difficulty = world.options.puzzle_randomization if difficulty == "sigma_normal": - self.reference_logic = StaticWitnessLogic.sigma_normal + self.reference_logic = static_witness_logic.sigma_normal elif difficulty == "sigma_expert": - self.reference_logic = StaticWitnessLogic.sigma_expert + self.reference_logic = static_witness_logic.sigma_expert elif difficulty == "none": - self.reference_logic = StaticWitnessLogic.vanilla + self.reference_logic = static_witness_logic.vanilla - self.locat = locat - self.created_entrances: Dict[Tuple[str, str], List[Entrance]] = KeyedDefaultDict(lambda _: []) + self.player_locations = player_locations + self.created_entrances: Dict[Tuple[str, str], List[Entrance]] = defaultdict(lambda: []) self.created_regions: Dict[str, Region] = dict() diff --git a/worlds/witness/ruff.toml b/worlds/witness/ruff.toml new file mode 100644 index 000000000000..d42361a4aaa9 --- /dev/null +++ b/worlds/witness/ruff.toml @@ -0,0 +1,11 @@ +line-length = 120 + +[lint] +select = ["E", "F", "W", "I", "N", "Q", "UP", "RUF", "ISC", "T20"] +ignore = ["RUF012", "RUF100"] + +[per-file-ignores] +# The way options definitions work right now, I am forced to break line length requirements. +"options.py" = ["E501"] +# The import list would just be so big if I imported every option individually in presets.py +"presets.py" = ["F403", "F405"] diff --git a/worlds/witness/rules.py b/worlds/witness/rules.py index 8636829a4ef1..6445545e9b7a 100644 --- a/worlds/witness/rules.py +++ b/worlds/witness/rules.py @@ -3,13 +3,16 @@ depending on the items received """ -from typing import TYPE_CHECKING, Callable, FrozenSet +from typing import TYPE_CHECKING, FrozenSet from BaseClasses import CollectionState -from .player_logic import WitnessPlayerLogic + +from worlds.generic.Rules import CollectionRule, set_rule + +from . import WitnessPlayerRegions +from .data import static_logic as static_witness_logic from .locations import WitnessPlayerLocations -from . import StaticWitnessLogic, WitnessRegions -from worlds.generic.Rules import set_rule +from .player_logic import WitnessPlayerLogic if TYPE_CHECKING: from . import WitnessWorld @@ -30,17 +33,17 @@ def _has_laser(laser_hex: str, world: "WitnessWorld", player: int, - redirect_required: bool) -> Callable[[CollectionState], bool]: + redirect_required: bool) -> CollectionRule: if laser_hex == "0x012FB" and redirect_required: return lambda state: ( - _can_solve_panel(laser_hex, world, world.player, world.player_logic, world.locat)(state) + _can_solve_panel(laser_hex, world, world.player, world.player_logic, world.player_locations)(state) and state.has("Desert Laser Redirection", player) ) else: - return _can_solve_panel(laser_hex, world, world.player, world.player_logic, world.locat) + return _can_solve_panel(laser_hex, world, world.player, world.player_logic, world.player_locations) -def _has_lasers(amount: int, world: "WitnessWorld", redirect_required: bool) -> Callable[[CollectionState], bool]: +def _has_lasers(amount: int, world: "WitnessWorld", redirect_required: bool) -> CollectionRule: laser_lambdas = [] for laser_hex in laser_hexes: @@ -52,7 +55,7 @@ def _has_lasers(amount: int, world: "WitnessWorld", redirect_required: bool) -> def _can_solve_panel(panel: str, world: "WitnessWorld", player: int, player_logic: WitnessPlayerLogic, - locat: WitnessPlayerLocations) -> Callable[[CollectionState], bool]: + player_locations: WitnessPlayerLocations) -> CollectionRule: """ Determines whether a panel can be solved """ @@ -60,15 +63,16 @@ def _can_solve_panel(panel: str, world: "WitnessWorld", player: int, player_logi panel_obj = player_logic.REFERENCE_LOGIC.ENTITIES_BY_HEX[panel] entity_name = panel_obj["checkName"] - if entity_name + " Solved" in locat.EVENT_LOCATION_TABLE: + if entity_name + " Solved" in player_locations.EVENT_LOCATION_TABLE: return lambda state: state.has(player_logic.EVENT_ITEM_PAIRS[entity_name + " Solved"], player) else: return make_lambda(panel, world) -def _can_move_either_direction(state: CollectionState, source: str, target: str, regio: WitnessRegions) -> bool: - entrance_forward = regio.created_entrances[source, target] - entrance_backward = regio.created_entrances[target, source] +def _can_move_either_direction(state: CollectionState, source: str, target: str, + player_regions: WitnessPlayerRegions) -> bool: + entrance_forward = player_regions.created_entrances[source, target] + entrance_backward = player_regions.created_entrances[target, source] return ( any(entrance.can_reach(state) for entrance in entrance_forward) @@ -81,49 +85,49 @@ def _can_do_expert_pp2(state: CollectionState, world: "WitnessWorld") -> bool: player = world.player hedge_2_access = ( - _can_move_either_direction(state, "Keep 2nd Maze", "Keep", world.regio) + _can_move_either_direction(state, "Keep 2nd Maze", "Keep", world.player_regions) ) hedge_3_access = ( - _can_move_either_direction(state, "Keep 3rd Maze", "Keep", world.regio) - or _can_move_either_direction(state, "Keep 3rd Maze", "Keep 2nd Maze", world.regio) - and hedge_2_access + _can_move_either_direction(state, "Keep 3rd Maze", "Keep", world.player_regions) + or _can_move_either_direction(state, "Keep 3rd Maze", "Keep 2nd Maze", world.player_regions) + and hedge_2_access ) hedge_4_access = ( - _can_move_either_direction(state, "Keep 4th Maze", "Keep", world.regio) - or _can_move_either_direction(state, "Keep 4th Maze", "Keep 3rd Maze", world.regio) - and hedge_3_access + _can_move_either_direction(state, "Keep 4th Maze", "Keep", world.player_regions) + or _can_move_either_direction(state, "Keep 4th Maze", "Keep 3rd Maze", world.player_regions) + and hedge_3_access ) hedge_access = ( - _can_move_either_direction(state, "Keep 4th Maze", "Keep Tower", world.regio) - and state.can_reach("Keep", "Region", player) - and hedge_4_access + _can_move_either_direction(state, "Keep 4th Maze", "Keep Tower", world.player_regions) + and state.can_reach("Keep", "Region", player) + and hedge_4_access ) backwards_to_fourth = ( - state.can_reach("Keep", "Region", player) - and _can_move_either_direction(state, "Keep 4th Pressure Plate", "Keep Tower", world.regio) - and ( - _can_move_either_direction(state, "Keep", "Keep Tower", world.regio) - or hedge_access - ) + state.can_reach("Keep", "Region", player) + and _can_move_either_direction(state, "Keep 4th Pressure Plate", "Keep Tower", world.player_regions) + and ( + _can_move_either_direction(state, "Keep", "Keep Tower", world.player_regions) + or hedge_access + ) ) shadows_shortcut = ( - state.can_reach("Main Island", "Region", player) - and _can_move_either_direction(state, "Keep 4th Pressure Plate", "Shadows", world.regio) + state.can_reach("Main Island", "Region", player) + and _can_move_either_direction(state, "Keep 4th Pressure Plate", "Shadows", world.player_regions) ) backwards_access = ( - _can_move_either_direction(state, "Keep 3rd Pressure Plate", "Keep 4th Pressure Plate", world.regio) - and (backwards_to_fourth or shadows_shortcut) + _can_move_either_direction(state, "Keep 3rd Pressure Plate", "Keep 4th Pressure Plate", world.player_regions) + and (backwards_to_fourth or shadows_shortcut) ) front_access = ( - _can_move_either_direction(state, "Keep 2nd Pressure Plate", "Keep", world.regio) - and state.can_reach("Keep", "Region", player) + _can_move_either_direction(state, "Keep 2nd Pressure Plate", "Keep", world.player_regions) + and state.can_reach("Keep", "Region", player) ) return front_access and backwards_access @@ -131,27 +135,27 @@ def _can_do_expert_pp2(state: CollectionState, world: "WitnessWorld") -> bool: def _can_do_theater_to_tunnels(state: CollectionState, world: "WitnessWorld") -> bool: direct_access = ( - _can_move_either_direction(state, "Tunnels", "Windmill Interior", world.regio) - and _can_move_either_direction(state, "Theater", "Windmill Interior", world.regio) + _can_move_either_direction(state, "Tunnels", "Windmill Interior", world.player_regions) + and _can_move_either_direction(state, "Theater", "Windmill Interior", world.player_regions) ) theater_from_town = ( - _can_move_either_direction(state, "Town", "Windmill Interior", world.regio) - and _can_move_either_direction(state, "Theater", "Windmill Interior", world.regio) - or _can_move_either_direction(state, "Town", "Theater", world.regio) + _can_move_either_direction(state, "Town", "Windmill Interior", world.player_regions) + and _can_move_either_direction(state, "Theater", "Windmill Interior", world.player_regions) + or _can_move_either_direction(state, "Town", "Theater", world.player_regions) ) tunnels_from_town = ( - _can_move_either_direction(state, "Tunnels", "Windmill Interior", world.regio) - and _can_move_either_direction(state, "Town", "Windmill Interior", world.regio) - or _can_move_either_direction(state, "Tunnels", "Town", world.regio) + _can_move_either_direction(state, "Tunnels", "Windmill Interior", world.player_regions) + and _can_move_either_direction(state, "Town", "Windmill Interior", world.player_regions) + or _can_move_either_direction(state, "Tunnels", "Town", world.player_regions) ) return direct_access or theater_from_town and tunnels_from_town def _has_item(item: str, world: "WitnessWorld", player: int, - player_logic: WitnessPlayerLogic, locat: WitnessPlayerLocations) -> Callable[[CollectionState], bool]: + player_logic: WitnessPlayerLogic, player_locations: WitnessPlayerLocations) -> CollectionRule: if item in player_logic.REFERENCE_LOGIC.ALL_REGIONS_BY_NAME: return lambda state: state.can_reach(item, "Region", player) if item == "7 Lasers": @@ -171,21 +175,21 @@ def _has_item(item: str, world: "WitnessWorld", player: int, elif item == "Theater to Tunnels": return lambda state: _can_do_theater_to_tunnels(state, world) if item in player_logic.USED_EVENT_NAMES_BY_HEX: - return _can_solve_panel(item, world, player, player_logic, locat) + return _can_solve_panel(item, world, player, player_logic, player_locations) - prog_item = StaticWitnessLogic.get_parent_progressive_item(item) + prog_item = static_witness_logic.get_parent_progressive_item(item) return lambda state: state.has(prog_item, player, player_logic.MULTI_AMOUNTS[item]) def _meets_item_requirements(requirements: FrozenSet[FrozenSet[str]], - world: "WitnessWorld") -> Callable[[CollectionState], bool]: + world: "WitnessWorld") -> CollectionRule: """ Checks whether item and panel requirements are met for a panel """ lambda_conversion = [ - [_has_item(item, world, world.player, world.player_logic, world.locat) for item in subset] + [_has_item(item, world, world.player, world.player_logic, world.player_locations) for item in subset] for subset in requirements ] @@ -195,7 +199,7 @@ def _meets_item_requirements(requirements: FrozenSet[FrozenSet[str]], ) -def make_lambda(entity_hex: str, world: "WitnessWorld") -> Callable[[CollectionState], bool]: +def make_lambda(entity_hex: str, world: "WitnessWorld") -> CollectionRule: """ Lambdas are created in a for loop so values need to be captured """ @@ -204,15 +208,15 @@ def make_lambda(entity_hex: str, world: "WitnessWorld") -> Callable[[CollectionS return _meets_item_requirements(entity_req, world) -def set_rules(world: "WitnessWorld"): +def set_rules(world: "WitnessWorld") -> None: """ Sets all rules for all locations """ - for location in world.locat.CHECK_LOCATION_TABLE: + for location in world.player_locations.CHECK_LOCATION_TABLE: real_location = location - if location in world.locat.EVENT_LOCATION_TABLE: + if location in world.player_locations.EVENT_LOCATION_TABLE: real_location = location[:-7] associated_entity = world.player_logic.REFERENCE_LOGIC.ENTITIES_BY_NAME[real_location] @@ -220,8 +224,8 @@ def set_rules(world: "WitnessWorld"): rule = make_lambda(entity_hex, world) - location = world.multiworld.get_location(location, world.player) + location = world.get_location(location) set_rule(location, rule) - world.multiworld.completion_condition[world.player] = lambda state: state.has('Victory', world.player) + world.multiworld.completion_condition[world.player] = lambda state: state.has("Victory", world.player) From 9012afeb75734e9a88ad73bf262c455ac779a339 Mon Sep 17 00:00:00 2001 From: Ziktofel Date: Fri, 12 Apr 2024 00:28:59 +0200 Subject: [PATCH 012/153] SC2: Fix possible non-determinism in goal selection (#3123) --- worlds/sc2/PoolFilter.py | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/worlds/sc2/PoolFilter.py b/worlds/sc2/PoolFilter.py index 068c62314923..d1b58f9b2096 100644 --- a/worlds/sc2/PoolFilter.py +++ b/worlds/sc2/PoolFilter.py @@ -58,7 +58,8 @@ def filter_missions(world: World) -> Dict[MissionPools, List[SC2Mission]]: # Vanilla uses the entire mission pool goal_priorities: Dict[SC2Campaign, SC2CampaignGoalPriority] = {campaign: get_campaign_goal_priority(campaign) for campaign in enabled_campaigns} goal_level = max(goal_priorities.values()) - candidate_campaigns = [campaign for campaign, goal_priority in goal_priorities.items() if goal_priority == goal_level] + candidate_campaigns: List[SC2Campaign] = [campaign for campaign, goal_priority in goal_priorities.items() if goal_priority == goal_level] + candidate_campaigns.sort(key=lambda it: it.id) goal_campaign = world.random.choice(candidate_campaigns) if campaign_final_mission_locations[goal_campaign] is not None: mission_pools[MissionPools.FINAL] = [campaign_final_mission_locations[goal_campaign].mission] @@ -70,7 +71,8 @@ def filter_missions(world: World) -> Dict[MissionPools, List[SC2Mission]]: # Finding the goal map goal_priorities = {campaign: get_campaign_goal_priority(campaign, excluded_missions) for campaign in enabled_campaigns} goal_level = max(goal_priorities.values()) - candidate_campaigns = [campaign for campaign, goal_priority in goal_priorities.items() if goal_priority == goal_level] + candidate_campaigns: List[SC2Campaign] = [campaign for campaign, goal_priority in goal_priorities.items() if goal_priority == goal_level] + candidate_campaigns.sort(key=lambda it: it.id) goal_campaign = world.random.choice(candidate_campaigns) primary_goal = campaign_final_mission_locations[goal_campaign] if primary_goal is None or primary_goal.mission in excluded_missions: From 8952fbdc0374d163942ab957ba21ab559b14ab85 Mon Sep 17 00:00:00 2001 From: Silvris <58583688+Silvris@users.noreply.github.com> Date: Thu, 11 Apr 2024 17:29:40 -0500 Subject: [PATCH 013/153] KDL3: Fix boss access on open world disabled (#3120) --- worlds/kdl3/Regions.py | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/worlds/kdl3/Regions.py b/worlds/kdl3/Regions.py index 794a565e0a56..8909c58be3e5 100644 --- a/worlds/kdl3/Regions.py +++ b/worlds/kdl3/Regions.py @@ -110,7 +110,11 @@ def generate_rooms(world: "KDL3World", level_regions: typing.Dict[int, Region]): else: world.multiworld.get_location(world.location_id_to_name[world.player_levels[level][stage - 1]], world.player).parent_region.add_exits([first_rooms[proper_stage].name]) - level_regions[level].add_exits([first_rooms[0x770200 + level - 1].name]) + if world.options.open_world: + level_regions[level].add_exits([first_rooms[0x770200 + level - 1].name]) + else: + world.multiworld.get_location(world.location_id_to_name[world.player_levels[level][5]], world.player)\ + .parent_region.add_exits([first_rooms[0x770200 + level - 1].name]) def generate_valid_levels(world: "KDL3World", enforce_world: bool, enforce_pattern: bool) -> dict: From c534cb79b59dddefd64d72e1cd52acfce36c58a1 Mon Sep 17 00:00:00 2001 From: Scipio Wright Date: Thu, 11 Apr 2024 18:30:31 -0400 Subject: [PATCH 014/153] TUNIC: Fix link to player options page in setup guide (#3086) --- worlds/tunic/docs/setup_en.md | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/worlds/tunic/docs/setup_en.md b/worlds/tunic/docs/setup_en.md index 5ec41e8d526e..94a8a0384191 100644 --- a/worlds/tunic/docs/setup_en.md +++ b/worlds/tunic/docs/setup_en.md @@ -54,7 +54,7 @@ Launch the game, and if everything was installed correctly you should see `Rando ### Configure Your YAML File -Visit the [TUNIC options page](/games/Tunic/player-options) to generate a YAML with your selected options. +Visit the [TUNIC options page](/games/TUNIC/player-options) to generate a YAML with your selected options. ### Configure Your Mod Settings Launch the game, and using the menu on the Title Screen select `Archipelago` under `Randomizer Mode`. @@ -65,4 +65,4 @@ Once you've input your information, click the `Close` button. If everything was An error message will display if the game fails to connect to the server. -Be sure to also look at the in-game options menu for a variety of additional settings, such as enemy randomization! \ No newline at end of file +Be sure to also look at the in-game options menu for a variety of additional settings, such as enemy randomization! From cf59cfaad07c4db10e90b3417663941cdf1985dd Mon Sep 17 00:00:00 2001 From: Bryce Wilson Date: Thu, 11 Apr 2024 16:31:53 -0600 Subject: [PATCH 015/153] Pokemon Emerald: Change Ho-Oh capitalization (#3069) --- worlds/pokemon_emerald/client.py | 2 +- worlds/pokemon_emerald/data.py | 2 +- worlds/pokemon_emerald/data/locations.json | 2 +- worlds/pokemon_emerald/options.py | 4 ++-- worlds/pokemon_emerald/rules.py | 2 +- 5 files changed, 6 insertions(+), 6 deletions(-) diff --git a/worlds/pokemon_emerald/client.py b/worlds/pokemon_emerald/client.py index 3b9f90270d17..0be48261cd46 100644 --- a/worlds/pokemon_emerald/client.py +++ b/worlds/pokemon_emerald/client.py @@ -98,7 +98,7 @@ "Registeel": "REGISTEEL", "Mew": "MEW", "Deoxys": "DEOXYS", - "Ho-oh": "HO_OH", + "Ho-Oh": "HO_OH", "Lugia": "LUGIA", } diff --git a/worlds/pokemon_emerald/data.py b/worlds/pokemon_emerald/data.py index 786740a9e48f..aa923d7ef0d7 100644 --- a/worlds/pokemon_emerald/data.py +++ b/worlds/pokemon_emerald/data.py @@ -741,7 +741,7 @@ def _init() -> None: ("SPECIES_PUPITAR", "Pupitar", 247), ("SPECIES_TYRANITAR", "Tyranitar", 248), ("SPECIES_LUGIA", "Lugia", 249), - ("SPECIES_HO_OH", "Ho-oh", 250), + ("SPECIES_HO_OH", "Ho-Oh", 250), ("SPECIES_CELEBI", "Celebi", 251), ("SPECIES_TREECKO", "Treecko", 252), ("SPECIES_GROVYLE", "Grovyle", 253), diff --git a/worlds/pokemon_emerald/data/locations.json b/worlds/pokemon_emerald/data/locations.json index 6affdf414688..55ef15d871bb 100644 --- a/worlds/pokemon_emerald/data/locations.json +++ b/worlds/pokemon_emerald/data/locations.json @@ -2877,7 +2877,7 @@ "tags": ["Pokedex"] }, "POKEDEX_REWARD_250": { - "label": "Pokedex - Ho-oh", + "label": "Pokedex - Ho-Oh", "tags": ["Pokedex"] }, "POKEDEX_REWARD_251": { diff --git a/worlds/pokemon_emerald/options.py b/worlds/pokemon_emerald/options.py index 69ce47f20775..978f9d3dcdc9 100644 --- a/worlds/pokemon_emerald/options.py +++ b/worlds/pokemon_emerald/options.py @@ -246,7 +246,7 @@ class AllowedLegendaryHuntEncounters(OptionSet): "Regirock" "Registeel" "Regice" - "Ho-oh" + "Ho-Oh" "Lugia" "Deoxys" "Mew" @@ -261,7 +261,7 @@ class AllowedLegendaryHuntEncounters(OptionSet): "Regirock", "Registeel", "Regice", - "Ho-oh", + "Ho-Oh", "Lugia", "Deoxys", "Mew", diff --git a/worlds/pokemon_emerald/rules.py b/worlds/pokemon_emerald/rules.py index 059e21b74998..0b5c6b79c03b 100644 --- a/worlds/pokemon_emerald/rules.py +++ b/worlds/pokemon_emerald/rules.py @@ -56,7 +56,7 @@ def defeated_n_gym_leaders(state: CollectionState, n: int) -> bool: "Registeel": "REGISTEEL", "Mew": "MEW", "Deoxys": "DEOXYS", - "Ho-oh": "HO_OH", + "Ho-Oh": "HO_OH", "Lugia": "LUGIA", }.items() if name in world.options.allowed_legendary_hunt_encounters.value From 0f2bd0fb85c4726cfabf090a7ef5c7df69fef2ff Mon Sep 17 00:00:00 2001 From: Justus Lind Date: Fri, 12 Apr 2024 08:44:16 +1000 Subject: [PATCH 016/153] Muse Dash: Update songs to 4.2.0. Add a new trap. (#3053) --- worlds/musedash/MuseDashCollection.py | 6 ++++-- worlds/musedash/MuseDashData.txt | 11 +++++++++-- worlds/musedash/test/TestDifficultyRanges.py | 6 +++--- 3 files changed, 16 insertions(+), 7 deletions(-) diff --git a/worlds/musedash/MuseDashCollection.py b/worlds/musedash/MuseDashCollection.py index 20bb8decebcc..c223893df66b 100644 --- a/worlds/musedash/MuseDashCollection.py +++ b/worlds/musedash/MuseDashCollection.py @@ -35,13 +35,14 @@ class MuseDashCollections: "Rush-Hour", "Find this Month's Featured Playlist", "PeroPero in the Universe", - "umpopoff" + "umpopoff", + "P E R O P E R O Brother Dance", ] REMOVED_SONGS = [ "CHAOS Glitch", "FM 17314 SUGAR RADIO", - "Yume Ou Mono Yo Secret" + "Yume Ou Mono Yo Secret", ] album_items: Dict[str, AlbumData] = {} @@ -57,6 +58,7 @@ class MuseDashCollections: "Chromatic Aberration Trap": STARTING_CODE + 5, "Background Freeze Trap": STARTING_CODE + 6, "Gray Scale Trap": STARTING_CODE + 7, + "Focus Line Trap": STARTING_CODE + 10, } sfx_trap_items: Dict[str, int] = { diff --git a/worlds/musedash/MuseDashData.txt b/worlds/musedash/MuseDashData.txt index 620c1968bda8..0a8beba37b44 100644 --- a/worlds/musedash/MuseDashData.txt +++ b/worlds/musedash/MuseDashData.txt @@ -518,7 +518,7 @@ Haunted Dance|43-48|MD Plus Project|False|6|9|11| Hey Vincent.|43-49|MD Plus Project|True|6|8|10| Meteor feat. TEA|43-50|MD Plus Project|True|3|6|9| Narcissism Angel|43-51|MD Plus Project|True|1|3|6| -AlterLuna|43-52|MD Plus Project|True|6|8|11| +AlterLuna|43-52|MD Plus Project|True|6|8|11|12 Niki Tousen|43-53|MD Plus Project|True|6|8|10|11 Rettou Joutou|70-0|Rin Len's Mirrorland|False|4|7|9| Telecaster B-Boy|70-1|Rin Len's Mirrorland|False|5|7|10| @@ -537,4 +537,11 @@ Ruler Of My Heart VIVINOS|71-1|Valentine Stage|False|2|4|6| Reality Show|71-2|Valentine Stage|False|5|7|10| SIG feat.Tobokegao|71-3|Valentine Stage|True|3|6|8| Rose Love|71-4|Valentine Stage|True|2|4|7| -Euphoria|71-5|Valentine Stage|True|1|3|6| \ No newline at end of file +Euphoria|71-5|Valentine Stage|True|1|3|6| +P E R O P E R O Brother Dance|72-0|Legends of Muse Warriors|False|0|?|0| +PA PPA PANIC|72-1|Legends of Muse Warriors|False|4|8|10| +How To Make Music Game Song!|72-2|Legends of Muse Warriors|False|6|8|10|11 +Re Re|72-3|Legends of Muse Warriors|False|7|9|11|12 +Marmalade Twins|72-4|Legends of Muse Warriors|False|5|8|10| +DOMINATOR|72-5|Legends of Muse Warriors|False|7|9|11| +Teshikani TESHiKANi|72-6|Legends of Muse Warriors|False|5|7|9| diff --git a/worlds/musedash/test/TestDifficultyRanges.py b/worlds/musedash/test/TestDifficultyRanges.py index af3469aa080f..29a9a3ef1563 100644 --- a/worlds/musedash/test/TestDifficultyRanges.py +++ b/worlds/musedash/test/TestDifficultyRanges.py @@ -66,9 +66,9 @@ def test_songs_have_difficulty(self) -> None: for song_name in muse_dash_world.md_collection.DIFF_OVERRIDES: song = muse_dash_world.md_collection.song_items[song_name] - # umpopoff is a one time weird song. Its currently the only song in the game - # with non-standard difficulties and also doesn't have 3 or more difficulties. - if song_name == 'umpopoff': + # Some songs are weird and have less than the usual 3 difficulties. + # So this override is to avoid failing on these songs. + if song_name in ("umpopoff", "P E R O P E R O Brother Dance"): self.assertTrue(song.easy is None and song.hard is not None and song.master is None, f"Song '{song_name}' difficulty not set when it should be.") else: From 8d28c34f95f2d1cb9f39a0d9546e89c688b6a02f Mon Sep 17 00:00:00 2001 From: Ziktofel Date: Fri, 12 Apr 2024 00:46:15 +0200 Subject: [PATCH 017/153] SC2: Fix unused_items refill to respect item dependencies. (#3116) --- worlds/sc2/PoolFilter.py | 56 ++++++++++++++++++++++++++++++++++++---- 1 file changed, 51 insertions(+), 5 deletions(-) diff --git a/worlds/sc2/PoolFilter.py b/worlds/sc2/PoolFilter.py index d1b58f9b2096..e94dc4e214c8 100644 --- a/worlds/sc2/PoolFilter.py +++ b/worlds/sc2/PoolFilter.py @@ -244,8 +244,8 @@ def has_units_per_structure(self) -> bool: def generate_reduced_inventory(self, inventory_size: int, mission_requirements: List[Tuple[str, Callable]]) -> List[Item]: """Attempts to generate a reduced inventory that can fulfill the mission requirements.""" - inventory = list(self.item_pool) - locked_items = list(self.locked_items) + inventory: List[Item] = list(self.item_pool) + locked_items: List[Item] = list(self.locked_items) item_list = get_full_item_list() self.logical_inventory = [ item.name for item in inventory + locked_items + self.existing_items @@ -348,7 +348,7 @@ def attempt_removal(item: Item) -> bool: removable_generic_items.append(item) # Main cull process - unused_items = [] # Reusable items for the second pass + unused_items: List[str] = [] # Reusable items for the second pass while len(inventory) + len(locked_items) > inventory_size: if len(inventory) == 0: # There are more items than locations and all of them are already locked due to YAML or logic. @@ -396,18 +396,35 @@ def attempt_removal(item: Item) -> bool: if attempt_removal(item): unused_items.append(item.name) + pool_items: List[str] = [item.name for item in (inventory + locked_items + self.existing_items)] + unused_items = [ + unused_item for unused_item in unused_items + if item_list[unused_item].parent_item is None + or item_list[unused_item].parent_item in pool_items + ] + # Removing extra dependencies # WoL logical_inventory_set = set(self.logical_inventory) if not spider_mine_sources & logical_inventory_set: inventory = [item for item in inventory if not item.name.endswith("(Spider Mine)")] + unused_items = [item_name for item_name in unused_items if not item_name.endswith("(Spider Mine)")] if not BARRACKS_UNITS & logical_inventory_set: - inventory = [item for item in inventory if - not (item.name.startswith(ItemNames.TERRAN_INFANTRY_UPGRADE_PREFIX) or item.name == ItemNames.ORBITAL_STRIKE)] + inventory = [ + item for item in inventory + if not (item.name.startswith(ItemNames.TERRAN_INFANTRY_UPGRADE_PREFIX) + or item.name == ItemNames.ORBITAL_STRIKE)] + unused_items = [ + item_name for item_name in unused_items + if not (item_name.startswith( + ItemNames.TERRAN_INFANTRY_UPGRADE_PREFIX) + or item_name == ItemNames.ORBITAL_STRIKE)] if not FACTORY_UNITS & logical_inventory_set: inventory = [item for item in inventory if not item.name.startswith(ItemNames.TERRAN_VEHICLE_UPGRADE_PREFIX)] + unused_items = [item_name for item_name in unused_items if not item_name.startswith(ItemNames.TERRAN_VEHICLE_UPGRADE_PREFIX)] if not STARPORT_UNITS & logical_inventory_set: inventory = [item for item in inventory if not item.name.startswith(ItemNames.TERRAN_SHIP_UPGRADE_PREFIX)] + unused_items = [item_name for item_name in unused_items if not item_name.startswith(ItemNames.TERRAN_SHIP_UPGRADE_PREFIX)] # HotS # Baneling without sources => remove Baneling and upgrades if (ItemNames.ZERGLING_BANELING_ASPECT in self.logical_inventory @@ -416,6 +433,8 @@ def attempt_removal(item: Item) -> bool: ): inventory = [item for item in inventory if item.name != ItemNames.ZERGLING_BANELING_ASPECT] inventory = [item for item in inventory if item_list[item.name].parent_item != ItemNames.ZERGLING_BANELING_ASPECT] + unused_items = [item_name for item_name in unused_items if item_name != ItemNames.ZERGLING_BANELING_ASPECT] + unused_items = [item_name for item_name in unused_items if item_list[item_name].parent_item != ItemNames.ZERGLING_BANELING_ASPECT] # Spawn Banelings without Zergling => remove Baneling unit, keep upgrades except macro ones if (ItemNames.ZERGLING_BANELING_ASPECT in self.logical_inventory and ItemNames.ZERGLING not in self.logical_inventory @@ -423,9 +442,12 @@ def attempt_removal(item: Item) -> bool: ): inventory = [item for item in inventory if item.name != ItemNames.ZERGLING_BANELING_ASPECT] inventory = [item for item in inventory if item.name != ItemNames.BANELING_RAPID_METAMORPH] + unused_items = [item_name for item_name in unused_items if item_name != ItemNames.ZERGLING_BANELING_ASPECT] + unused_items = [item_name for item_name in unused_items if item_name != ItemNames.BANELING_RAPID_METAMORPH] if not {ItemNames.MUTALISK, ItemNames.CORRUPTOR, ItemNames.SCOURGE} & logical_inventory_set: inventory = [item for item in inventory if not item.name.startswith(ItemNames.ZERG_FLYER_UPGRADE_PREFIX)] locked_items = [item for item in locked_items if not item.name.startswith(ItemNames.ZERG_FLYER_UPGRADE_PREFIX)] + unused_items = [item_name for item_name in unused_items if not item_name.startswith(ItemNames.ZERG_FLYER_UPGRADE_PREFIX)] # T3 items removal rules - remove morph and its upgrades if the basic unit isn't in if not {ItemNames.MUTALISK, ItemNames.CORRUPTOR} & logical_inventory_set: inventory = [item for item in inventory if not item.name.endswith("(Mutalisk/Corruptor)")] @@ -433,45 +455,69 @@ def attempt_removal(item: Item) -> bool: inventory = [item for item in inventory if item_list[item.name].parent_item != ItemNames.MUTALISK_CORRUPTOR_DEVOURER_ASPECT] inventory = [item for item in inventory if item_list[item.name].parent_item != ItemNames.MUTALISK_CORRUPTOR_BROOD_LORD_ASPECT] inventory = [item for item in inventory if item_list[item.name].parent_item != ItemNames.MUTALISK_CORRUPTOR_VIPER_ASPECT] + unused_items = [item_name for item_name in unused_items if not item_name.endswith("(Mutalisk/Corruptor)")] + unused_items = [item_name for item_name in unused_items if item_list[item_name].parent_item != ItemNames.MUTALISK_CORRUPTOR_GUARDIAN_ASPECT] + unused_items = [item_name for item_name in unused_items if item_list[item_name].parent_item != ItemNames.MUTALISK_CORRUPTOR_DEVOURER_ASPECT] + unused_items = [item_name for item_name in unused_items if item_list[item_name].parent_item != ItemNames.MUTALISK_CORRUPTOR_BROOD_LORD_ASPECT] + unused_items = [item_name for item_name in unused_items if item_list[item_name].parent_item != ItemNames.MUTALISK_CORRUPTOR_VIPER_ASPECT] if ItemNames.ROACH not in logical_inventory_set: inventory = [item for item in inventory if item.name != ItemNames.ROACH_RAVAGER_ASPECT] inventory = [item for item in inventory if item_list[item.name].parent_item != ItemNames.ROACH_RAVAGER_ASPECT] + unused_items = [item_name for item_name in unused_items if item_name != ItemNames.ROACH_RAVAGER_ASPECT] + unused_items = [item_name for item_name in unused_items if item_list[item_name].parent_item != ItemNames.ROACH_RAVAGER_ASPECT] if ItemNames.HYDRALISK not in logical_inventory_set: inventory = [item for item in inventory if not item.name.endswith("(Hydralisk)")] inventory = [item for item in inventory if item_list[item.name].parent_item != ItemNames.HYDRALISK_LURKER_ASPECT] inventory = [item for item in inventory if item_list[item.name].parent_item != ItemNames.HYDRALISK_IMPALER_ASPECT] + unused_items = [item_name for item_name in unused_items if not item_name.endswith("(Hydralisk)")] + unused_items = [item_name for item_name in unused_items if item_list[item_name].parent_item != ItemNames.HYDRALISK_LURKER_ASPECT] + unused_items = [item_name for item_name in unused_items if item_list[item_name].parent_item != ItemNames.HYDRALISK_IMPALER_ASPECT] # LotV # Shared unit upgrades between several units if not {ItemNames.STALKER, ItemNames.INSTIGATOR, ItemNames.SLAYER} & logical_inventory_set: inventory = [item for item in inventory if not item.name.endswith("(Stalker/Instigator/Slayer)")] + unused_items = [item_name for item_name in unused_items if not item_name.endswith("(Stalker/Instigator/Slayer)")] if not {ItemNames.PHOENIX, ItemNames.MIRAGE} & logical_inventory_set: inventory = [item for item in inventory if not item.name.endswith("(Phoenix/Mirage)")] + unused_items = [item_name for item_name in unused_items if not item_name.endswith("(Phoenix/Mirage)")] if not {ItemNames.VOID_RAY, ItemNames.DESTROYER} & logical_inventory_set: inventory = [item for item in inventory if not item.name.endswith("(Void Ray/Destroyer)")] + unused_items = [item_name for item_name in unused_items if not item_name.endswith("(Void Ray/Destroyer)")] if not {ItemNames.IMMORTAL, ItemNames.ANNIHILATOR} & logical_inventory_set: inventory = [item for item in inventory if not item.name.endswith("(Immortal/Annihilator)")] + unused_items = [item_name for item_name in unused_items if not item_name.endswith("(Immortal/Annihilator)")] if not {ItemNames.DARK_TEMPLAR, ItemNames.AVENGER, ItemNames.BLOOD_HUNTER} & logical_inventory_set: inventory = [item for item in inventory if not item.name.endswith("(Dark Templar/Avenger/Blood Hunter)")] + unused_items = [item_name for item_name in unused_items if not item_name.endswith("(Dark Templar/Avenger/Blood Hunter)")] if not {ItemNames.HIGH_TEMPLAR, ItemNames.SIGNIFIER, ItemNames.ASCENDANT, ItemNames.DARK_TEMPLAR} & logical_inventory_set: inventory = [item for item in inventory if not item.name.endswith("(Archon)")] + unused_items = [item_name for item_name in unused_items if not item_name.endswith("(Archon)")] logical_inventory_set.difference_update([item_name for item_name in logical_inventory_set if item_name.endswith("(Archon)")]) if not {ItemNames.HIGH_TEMPLAR, ItemNames.SIGNIFIER, ItemNames.ARCHON_HIGH_ARCHON} & logical_inventory_set: inventory = [item for item in inventory if not item.name.endswith("(High Templar/Signifier)")] + unused_items = [item_name for item_name in unused_items if not item_name.endswith("(High Templar/Signifier)")] if ItemNames.SUPPLICANT not in logical_inventory_set: inventory = [item for item in inventory if item.name != ItemNames.ASCENDANT_POWER_OVERWHELMING] + unused_items = [item_name for item_name in unused_items if item_name != ItemNames.ASCENDANT_POWER_OVERWHELMING] if not {ItemNames.DARK_ARCHON, ItemNames.DARK_TEMPLAR_DARK_ARCHON_MELD} & logical_inventory_set: inventory = [item for item in inventory if not item.name.endswith("(Dark Archon)")] + unused_items = [item_name for item_name in unused_items if not item_name.endswith("(Dark Archon)")] if not {ItemNames.SENTRY, ItemNames.ENERGIZER, ItemNames.HAVOC} & logical_inventory_set: inventory = [item for item in inventory if not item.name.endswith("(Sentry/Energizer/Havoc)")] + unused_items = [item_name for item_name in unused_items if not item_name.endswith("(Sentry/Energizer/Havoc)")] if not {ItemNames.SENTRY, ItemNames.ENERGIZER, ItemNames.HAVOC, ItemNames.SHIELD_BATTERY} & logical_inventory_set: inventory = [item for item in inventory if not item.name.endswith("(Sentry/Energizer/Havoc/Shield Battery)")] + unused_items = [item_name for item_name in unused_items if not item_name.endswith("(Sentry/Energizer/Havoc/Shield Battery)")] if not {ItemNames.ZEALOT, ItemNames.CENTURION, ItemNames.SENTINEL} & logical_inventory_set: inventory = [item for item in inventory if not item.name.endswith("(Zealot/Sentinel/Centurion)")] + unused_items = [item_name for item_name in unused_items if not item_name.endswith("(Zealot/Sentinel/Centurion)")] # Static defense upgrades only if static defense present if not {ItemNames.PHOTON_CANNON, ItemNames.KHAYDARIN_MONOLITH, ItemNames.NEXUS_OVERCHARGE, ItemNames.SHIELD_BATTERY} & logical_inventory_set: inventory = [item for item in inventory if item.name != ItemNames.ENHANCED_TARGETING] + unused_items = [item_name for item_name in unused_items if item_name != ItemNames.ENHANCED_TARGETING] if not {ItemNames.PHOTON_CANNON, ItemNames.KHAYDARIN_MONOLITH, ItemNames.NEXUS_OVERCHARGE} & logical_inventory_set: inventory = [item for item in inventory if item.name != ItemNames.OPTIMIZED_ORDNANCE] + unused_items = [item_name for item_name in unused_items if item_name != ItemNames.OPTIMIZED_ORDNANCE] # Cull finished, adding locked items back into inventory inventory += locked_items From 5dcafac861629a04ef8461840478a7d16e5274f8 Mon Sep 17 00:00:00 2001 From: Aaron Wagener Date: Thu, 11 Apr 2024 17:49:22 -0500 Subject: [PATCH 018/153] Core: add Location.is_event property (#2968) --- BaseClasses.py | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/BaseClasses.py b/BaseClasses.py index 24dc074b63d4..a928f034b7f1 100644 --- a/BaseClasses.py +++ b/BaseClasses.py @@ -1075,6 +1075,11 @@ def __hash__(self): def __lt__(self, other: Location): return (self.player, self.name) < (other.player, other.name) + @property + def is_event(self) -> bool: + """Returns True if the address of this location is None, denoting it is an Event Location.""" + return self.address is None + @property def native_item(self) -> bool: """Returns True if the item in this location matches game.""" From b97cee4372ceff984408c90d1a228b1867346675 Mon Sep 17 00:00:00 2001 From: Ziktofel Date: Fri, 12 Apr 2024 00:52:27 +0200 Subject: [PATCH 019/153] SC2: Fix vanilla mission order connection (#3101) --- worlds/sc2/Regions.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/worlds/sc2/Regions.py b/worlds/sc2/Regions.py index e6c001b186a7..84830a9a32bd 100644 --- a/worlds/sc2/Regions.py +++ b/worlds/sc2/Regions.py @@ -180,7 +180,7 @@ def wol_cleared_missions(state: CollectionState, mission_count: int) -> bool: connect(world, names, "Menu", "Dark Whispers") connect(world, names, "Dark Whispers", "Ghosts in the Fog", lambda state: state.has("Beat Dark Whispers", player)) - connect(world, names, "Dark Whispers", "Evil Awoken", + connect(world, names, "Ghosts in the Fog", "Evil Awoken", lambda state: state.has("Beat Ghosts in the Fog", player)) if SC2Campaign.LOTV in enabled_campaigns: @@ -250,7 +250,7 @@ def wol_cleared_missions(state: CollectionState, mission_count: int) -> bool: connect(world, names, "Enemy Intelligence", "Trouble In Paradise", lambda state: state.has("Beat Enemy Intelligence", player)) connect(world, names, "Trouble In Paradise", "Night Terrors", - lambda state: state.has("Beat Evacuation", player)) + lambda state: state.has("Beat Trouble In Paradise", player)) connect(world, names, "Night Terrors", "Flashpoint", lambda state: state.has("Beat Night Terrors", player)) connect(world, names, "Flashpoint", "In the Enemy's Shadow", From 9bbc49204d645f66fe97cb7cfd51ee4cddb10183 Mon Sep 17 00:00:00 2001 From: PoryGone <98504756+PoryGone@users.noreply.github.com> Date: Thu, 11 Apr 2024 18:53:52 -0400 Subject: [PATCH 020/153] DKC3: Fix List Out of Range Error on Level Shuffle Hint extension (#3077) --- worlds/dkc3/Names/LocationName.py | 2 +- worlds/dkc3/__init__.py | 7 ++++++- 2 files changed, 7 insertions(+), 2 deletions(-) diff --git a/worlds/dkc3/Names/LocationName.py b/worlds/dkc3/Names/LocationName.py index f79a25f143de..dbd63623ab22 100644 --- a/worlds/dkc3/Names/LocationName.py +++ b/worlds/dkc3/Names/LocationName.py @@ -294,7 +294,7 @@ blue_region = "Blue's Beach Hut Region" blizzard_region = "Bizzard's Basecamp Region" -lake_orangatanga_region = "Lake_Orangatanga" +lake_orangatanga_region = "Lake Orangatanga" kremwood_forest_region = "Kremwood Forest" cotton_top_cove_region = "Cotton-Top Cove" mekanos_region = "Mekanos" diff --git a/worlds/dkc3/__init__.py b/worlds/dkc3/__init__.py index dfb42bd04ca8..b0e153dcd27b 100644 --- a/worlds/dkc3/__init__.py +++ b/worlds/dkc3/__init__.py @@ -201,7 +201,12 @@ def extend_hint_information(self, hint_data: typing.Dict[int, typing.Dict[int, s er_hint_data = {} for world_index in range(len(world_names)): for level_index in range(5): - level_region = self.multiworld.get_region(self.active_level_list[world_index * 5 + level_index], self.player) + level_id: int = world_index * 5 + level_index + + if level_id >= len(self.active_level_list): + break + + level_region = self.multiworld.get_region(self.active_level_list[level_id], self.player) for location in level_region.locations: er_hint_data[location.address] = world_names[world_index] From ea4d0abb7fc82e4b2c704ca32bf22da1e67506bb Mon Sep 17 00:00:00 2001 From: Scipio Wright Date: Thu, 11 Apr 2024 19:31:42 -0400 Subject: [PATCH 021/153] Webhost: Fix a typo on Start Playing page (#3122) * add an or * Changed the wording to account for uploading multiple files --- WebHostLib/templates/startPlaying.html | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/WebHostLib/templates/startPlaying.html b/WebHostLib/templates/startPlaying.html index 436af3df07e8..ab2f021d61d2 100644 --- a/WebHostLib/templates/startPlaying.html +++ b/WebHostLib/templates/startPlaying.html @@ -18,7 +18,7 @@

Start Playing



To start playing a game, you'll first need to generate a randomized game. - You'll need to upload either a config file or a zip file containing one more config files. + You'll need to upload one or more config files (YAMLs) or a zip file containing one or more config files.

If you have already generated a game and just need to host it, this site can
From 30dda013de7ad5fba35e61fdc7b913e0aff95b01 Mon Sep 17 00:00:00 2001 From: Ziktofel Date: Fri, 12 Apr 2024 03:01:12 +0200 Subject: [PATCH 022/153] SC2: Fix Typos in location names (#3108) --- worlds/sc2/Locations.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/worlds/sc2/Locations.py b/worlds/sc2/Locations.py index 22b400a238dd..bf9c06fa3f78 100644 --- a/worlds/sc2/Locations.py +++ b/worlds/sc2/Locations.py @@ -1368,9 +1368,9 @@ def get_locations(world: Optional[World]) -> Tuple[LocationData, ...]: lambda state: logic.templars_charge_requirement(state)), LocationData("Templar's Charge", "Templar's Charge: Southeast Power Core", SC2LOTV_LOC_ID_OFFSET + 1903, LocationType.EXTRA, lambda state: logic.templars_charge_requirement(state)), - LocationData("Templar's Charge", "Templar's Charge: West Hybrid Statis Chamber", SC2LOTV_LOC_ID_OFFSET + 1904, LocationType.VANILLA, + LocationData("Templar's Charge", "Templar's Charge: West Hybrid Stasis Chamber", SC2LOTV_LOC_ID_OFFSET + 1904, LocationType.VANILLA, lambda state: logic.templars_charge_requirement(state)), - LocationData("Templar's Charge", "Templar's Charge: Southeast Hybrid Statis Chamber", SC2LOTV_LOC_ID_OFFSET + 1905, LocationType.VANILLA, + LocationData("Templar's Charge", "Templar's Charge: Southeast Hybrid Stasis Chamber", SC2LOTV_LOC_ID_OFFSET + 1905, LocationType.VANILLA, lambda state: logic.protoss_fleet(state)), LocationData("Templar's Return", "Templar's Return: Victory", SC2LOTV_LOC_ID_OFFSET + 2000, LocationType.VICTORY, lambda state: logic.templars_return_requirement(state)), From 242126b4b2c9022bf1ee2d71a93fdf2416eb9785 Mon Sep 17 00:00:00 2001 From: Chris Wilson Date: Fri, 12 Apr 2024 00:32:10 -0400 Subject: [PATCH 023/153] ArchipIDLE 2024 (#3079) * Update item pool to include 25 jokes and videos as progression items, as well as a progression GeroCities profile * Fix a bug in Items.py causing item names to be appended inappropriately * Remove unnecessary import * Change item pool to have 50 jokes and 20 motivational videos * Adjust item pool to have 40 of both jokes and videos * Fix imports to allow compressing for distribution as a .apworld --- worlds/archipidle/Items.py | 7 ++++-- worlds/archipidle/Rules.py | 30 ++++++++--------------- worlds/archipidle/__init__.py | 45 +++++++++++++++++++++++++---------- 3 files changed, 48 insertions(+), 34 deletions(-) diff --git a/worlds/archipidle/Items.py b/worlds/archipidle/Items.py index 2b5e6e9a81d0..94665631b711 100644 --- a/worlds/archipidle/Items.py +++ b/worlds/archipidle/Items.py @@ -1,4 +1,7 @@ item_table = ( + 'An Old GeoCities Profile', + 'Very Funny Joke', + 'Motivational Video', 'Staples Easy Button', 'One Million Dollars', 'Replica Master Sword', @@ -13,7 +16,7 @@ '2012 Magic the Gathering Core Set Starter Box', 'Poke\'mon Booster Pack', 'USB Speakers', - 'Plastic Spork', + 'Eco-Friendly Spork', 'Cheeseburger', 'Brand New Car', 'Hunting Knife', @@ -22,7 +25,7 @@ 'One-Up Mushroom', 'Nokia N-GAGE', '2-Liter of Sprite', - 'Free trial of the critically acclaimed MMORPG Final Fantasy XIV, including the entirety of A Realm Reborn and the award winning Heavensward expansion up to level 60 with no restrictions on playtime!', + 'Free trial of the critically acclaimed MMORPG Final Fantasy XIV, including the entirety of A Realm Reborn and the award winning Heavensward and Stormblood expansions up to level 70 with no restrictions on playtime!', 'Can of Compressed Air', 'Striped Kitten', 'USB Power Adapter', diff --git a/worlds/archipidle/Rules.py b/worlds/archipidle/Rules.py index 3bf4bad475e1..2cc6220c6927 100644 --- a/worlds/archipidle/Rules.py +++ b/worlds/archipidle/Rules.py @@ -1,6 +1,5 @@ from BaseClasses import MultiWorld -from ..AutoWorld import LogicMixin -from ..generic.Rules import set_rule +from worlds.AutoWorld import LogicMixin class ArchipIDLELogic(LogicMixin): @@ -10,29 +9,20 @@ def _archipidle_location_is_accessible(self, player_id, items_required): def set_rules(world: MultiWorld, player: int): for i in range(16, 31): - set_rule( - world.get_location(f"IDLE item number {i}", player), - lambda state: state._archipidle_location_is_accessible(player, 4) - ) + world.get_location(f"IDLE item number {i}", player).access_rule = lambda \ + state: state._archipidle_location_is_accessible(player, 4) for i in range(31, 51): - set_rule( - world.get_location(f"IDLE item number {i}", player), - lambda state: state._archipidle_location_is_accessible(player, 10) - ) + world.get_location(f"IDLE item number {i}", player).access_rule = lambda \ + state: state._archipidle_location_is_accessible(player, 10) for i in range(51, 101): - set_rule( - world.get_location(f"IDLE item number {i}", player), - lambda state: state._archipidle_location_is_accessible(player, 20) - ) + world.get_location(f"IDLE item number {i}", player).access_rule = lambda \ + state: state._archipidle_location_is_accessible(player, 20) for i in range(101, 201): - set_rule( - world.get_location(f"IDLE item number {i}", player), - lambda state: state._archipidle_location_is_accessible(player, 40) - ) + world.get_location(f"IDLE item number {i}", player).access_rule = lambda \ + state: state._archipidle_location_is_accessible(player, 40) world.completion_condition[player] =\ - lambda state:\ - state.can_reach(world.get_location("IDLE item number 200", player), "Location", player) + lambda state: state.can_reach(world.get_location("IDLE item number 200", player), "Location", player) diff --git a/worlds/archipidle/__init__.py b/worlds/archipidle/__init__.py index 2d182f31dc20..f4345444efb9 100644 --- a/worlds/archipidle/__init__.py +++ b/worlds/archipidle/__init__.py @@ -1,8 +1,8 @@ from BaseClasses import Item, MultiWorld, Region, Location, Entrance, Tutorial, ItemClassification +from worlds.AutoWorld import World, WebWorld +from datetime import datetime from .Items import item_table from .Rules import set_rules -from ..AutoWorld import World, WebWorld -from datetime import datetime class ArchipIDLEWebWorld(WebWorld): @@ -29,11 +29,10 @@ class ArchipIDLEWebWorld(WebWorld): class ArchipIDLEWorld(World): """ - An idle game which sends a check every thirty seconds, up to two hundred checks. + An idle game which sends a check every thirty to sixty seconds, up to two hundred checks. """ game = "ArchipIDLE" topology_present = False - data_version = 5 hidden = (datetime.now().month != 4) # ArchipIDLE is only visible during April web = ArchipIDLEWebWorld() @@ -56,18 +55,40 @@ def create_item(self, name: str) -> Item: return Item(name, ItemClassification.progression, self.item_name_to_id[name], self.player) def create_items(self): - item_table_copy = list(item_table) - self.multiworld.random.shuffle(item_table_copy) + item_pool = [ + ArchipIDLEItem( + item_table[0], + ItemClassification.progression, + self.item_name_to_id[item_table[0]], + self.player + ) + ] - item_pool = [] - for i in range(200): - item = ArchipIDLEItem( + for i in range(40): + item_pool.append(ArchipIDLEItem( + item_table[1], + ItemClassification.progression, + self.item_name_to_id[item_table[1]], + self.player + )) + + for i in range(40): + item_pool.append(ArchipIDLEItem( + item_table[2], + ItemClassification.filler, + self.item_name_to_id[item_table[2]], + self.player + )) + + item_table_copy = list(item_table[3:]) + self.random.shuffle(item_table_copy) + for i in range(119): + item_pool.append(ArchipIDLEItem( item_table_copy[i], - ItemClassification.progression if i < 40 else ItemClassification.filler, + ItemClassification.progression if i < 9 else ItemClassification.filler, self.item_name_to_id[item_table_copy[i]], self.player - ) - item_pool.append(item) + )) self.multiworld.itempool += item_pool From 1fc2c5ed4b8590e1396fcb457e96a3493526f05e Mon Sep 17 00:00:00 2001 From: Exempt-Medic <60412657+Exempt-Medic@users.noreply.github.com> Date: Fri, 12 Apr 2024 15:25:33 -0400 Subject: [PATCH 024/153] Core: Getting rid of forfeit_mode (#3099) --- MultiServer.py | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/MultiServer.py b/MultiServer.py index 395577b663c5..b70f2deae624 100644 --- a/MultiServer.py +++ b/MultiServer.py @@ -586,7 +586,7 @@ def set_save(self, savedata: dict): self.location_check_points = savedata["game_options"]["location_check_points"] self.server_password = savedata["game_options"]["server_password"] self.password = savedata["game_options"]["password"] - self.release_mode = savedata["game_options"].get("release_mode", savedata["game_options"].get("forfeit_mode", "goal")) + self.release_mode = savedata["game_options"]["release_mode"] self.remaining_mode = savedata["game_options"]["remaining_mode"] self.collect_mode = savedata["game_options"]["collect_mode"] self.item_cheat = savedata["game_options"]["item_cheat"] @@ -631,8 +631,6 @@ def slot_set(self, slot) -> typing.Set[int]: def _set_options(self, server_options: dict): for key, value in server_options.items(): - if key == "forfeit_mode": - key = "release_mode" data_type = self.simple_options.get(key, None) if data_type is not None: if value not in {False, True, None}: # some can be boolean OR text, such as password From 7e660dbd23863efc909abe32932972c495460e8b Mon Sep 17 00:00:00 2001 From: Alchav <59858495+Alchav@users.noreply.github.com> Date: Sat, 13 Apr 2024 11:58:50 -0400 Subject: [PATCH 025/153] =?UTF-8?q?Pok=C3=A9mon=20Red=20and=20Blue:=200.4.?= =?UTF-8?q?5=20Fixes=20(#3106)?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- worlds/pokemon_rb/__init__.py | 102 +++++---------------------------- worlds/pokemon_rb/client.py | 4 +- worlds/pokemon_rb/locations.py | 2 +- worlds/pokemon_rb/pokemon.py | 101 +++++++++++++++++++++++++++++--- worlds/pokemon_rb/regions.py | 2 +- 5 files changed, 111 insertions(+), 100 deletions(-) diff --git a/worlds/pokemon_rb/__init__.py b/worlds/pokemon_rb/__init__.py index beb2010b58d3..b44e2f3b8faa 100644 --- a/worlds/pokemon_rb/__init__.py +++ b/worlds/pokemon_rb/__init__.py @@ -18,7 +18,7 @@ from .rom_addresses import rom_addresses from .text import encode_text from .rom import generate_output, get_base_rom_bytes, get_base_rom_path, RedDeltaPatch, BlueDeltaPatch -from .pokemon import process_pokemon_data, process_move_data +from .pokemon import process_pokemon_data, process_move_data, verify_hm_moves from .encounters import process_pokemon_locations, process_trainer_data from .rules import set_rules from .level_scaling import level_scaling @@ -279,12 +279,12 @@ def stage_fill_hook(cls, multiworld, progitempool, usefulitempool, filleritempoo def fill_hook(self, progitempool, usefulitempool, filleritempool, fill_locations): if not self.multiworld.badgesanity[self.player]: # Door Shuffle options besides Simple place badges during door shuffling - if not self.multiworld.door_shuffle[self.player] not in ("off", "simple"): + if self.multiworld.door_shuffle[self.player] in ("off", "simple"): badges = [item for item in progitempool if "Badge" in item.name and item.player == self.player] for badge in badges: self.multiworld.itempool.remove(badge) progitempool.remove(badge) - for _ in range(5): + for attempt in range(6): badgelocs = [ self.multiworld.get_location(loc, self.player) for loc in [ "Pewter Gym - Brock Prize", "Cerulean Gym - Misty Prize", @@ -293,6 +293,12 @@ def fill_hook(self, progitempool, usefulitempool, filleritempool, fill_locations "Cinnabar Gym - Blaine Prize", "Viridian Gym - Giovanni Prize" ] if self.multiworld.get_location(loc, self.player).item is None] state = self.multiworld.get_all_state(False) + # Give it two tries to place badges with wild Pokemon and learnsets as-is. + # If it can't, then try with all Pokemon collected, and we'll try to fix HM move availability after. + if attempt > 1: + for mon in poke_data.pokemon_data.keys(): + state.collect(self.create_item(mon), True) + state.sweep_for_events() self.multiworld.random.shuffle(badges) self.multiworld.random.shuffle(badgelocs) badgelocs_copy = badgelocs.copy() @@ -312,6 +318,7 @@ def fill_hook(self, progitempool, usefulitempool, filleritempool, fill_locations break else: raise FillError(f"Failed to place badges for player {self.player}") + verify_hm_moves(self.multiworld, self, self.player) if self.multiworld.key_items_only[self.player]: return @@ -355,97 +362,14 @@ def pre_fill(self) -> None: for location in self.multiworld.get_locations(self.player): if location.name in locs: location.show_in_spoiler = False - - def intervene(move, test_state): - move_bit = pow(2, poke_data.hm_moves.index(move) + 2) - viable_mons = [mon for mon in self.local_poke_data if self.local_poke_data[mon]["tms"][6] & move_bit] - if self.multiworld.randomize_wild_pokemon[self.player] and viable_mons: - accessible_slots = [loc for loc in self.multiworld.get_reachable_locations(test_state, self.player) if - loc.type == "Wild Encounter"] - - def number_of_zones(mon): - zones = set() - for loc in [slot for slot in accessible_slots if slot.item.name == mon]: - zones.add(loc.name.split(" - ")[0]) - return len(zones) - - placed_mons = [slot.item.name for slot in accessible_slots] - - if self.multiworld.area_1_to_1_mapping[self.player]: - placed_mons.sort(key=lambda i: number_of_zones(i)) - else: - # this sort method doesn't work if you reference the same list being sorted in the lambda - placed_mons_copy = placed_mons.copy() - placed_mons.sort(key=lambda i: placed_mons_copy.count(i)) - - placed_mon = placed_mons.pop() - replace_mon = self.multiworld.random.choice(viable_mons) - replace_slot = self.multiworld.random.choice([slot for slot in accessible_slots if slot.item.name - == placed_mon]) - if self.multiworld.area_1_to_1_mapping[self.player]: - zone = " - ".join(replace_slot.name.split(" - ")[:-1]) - replace_slots = [slot for slot in accessible_slots if slot.name.startswith(zone) and slot.item.name - == placed_mon] - for replace_slot in replace_slots: - replace_slot.item = self.create_item(replace_mon) - else: - replace_slot.item = self.create_item(replace_mon) - else: - tms_hms = self.local_tms + poke_data.hm_moves - flag = tms_hms.index(move) - mon_list = [mon for mon in poke_data.pokemon_data.keys() if test_state.has(mon, self.player)] - self.multiworld.random.shuffle(mon_list) - mon_list.sort(key=lambda mon: self.local_move_data[move]["type"] not in - [self.local_poke_data[mon]["type1"], self.local_poke_data[mon]["type2"]]) - for mon in mon_list: - if test_state.has(mon, self.player): - self.local_poke_data[mon]["tms"][int(flag / 8)] |= 1 << (flag % 8) - break - - last_intervene = None - while True: - intervene_move = None - test_state = self.multiworld.get_all_state(False) - if not logic.can_learn_hm(test_state, "Surf", self.player): - intervene_move = "Surf" - elif not logic.can_learn_hm(test_state, "Strength", self.player): - intervene_move = "Strength" - # cut may not be needed if accessibility is minimal, unless you need all 8 badges and badgesanity is off, - # as you will require cut to access celadon gyn - elif ((not logic.can_learn_hm(test_state, "Cut", self.player)) and - (self.multiworld.accessibility[self.player] != "minimal" or ((not - self.multiworld.badgesanity[self.player]) and max( - self.multiworld.elite_four_badges_condition[self.player], - self.multiworld.route_22_gate_condition[self.player], - self.multiworld.victory_road_condition[self.player]) - > 7) or (self.multiworld.door_shuffle[self.player] not in ("off", "simple")))): - intervene_move = "Cut" - elif ((not logic.can_learn_hm(test_state, "Flash", self.player)) - and self.multiworld.dark_rock_tunnel_logic[self.player] - and (self.multiworld.accessibility[self.player] != "minimal" - or self.multiworld.door_shuffle[self.player])): - intervene_move = "Flash" - # If no Pokémon can learn Fly, then during door shuffle it would simply not treat the free fly maps - # as reachable, and if on no door shuffle or simple, fly is simply never necessary. - # We only intervene if a Pokémon is able to learn fly but none are reachable, as that would have been - # considered in door shuffle. - elif ((not logic.can_learn_hm(test_state, "Fly", self.player)) - and self.multiworld.door_shuffle[self.player] not in - ("off", "simple") and [self.fly_map, self.town_map_fly_map] != ["Pallet Town", "Pallet Town"]): - intervene_move = "Fly" - if intervene_move: - if intervene_move == last_intervene: - raise Exception(f"Caught in infinite loop attempting to ensure {intervene_move} is available to player {self.player}") - intervene(intervene_move, test_state) - last_intervene = intervene_move - else: - break + verify_hm_moves(self.multiworld, self, self.player) # Delete evolution events for Pokémon that are not in logic in an all_state so that accessibility check does not # fail. Re-use test_state from previous final loop. + all_state = self.multiworld.get_all_state(False) evolutions_region = self.multiworld.get_region("Evolution", self.player) for location in evolutions_region.locations.copy(): - if not test_state.can_reach(location, player=self.player): + if not all_state.can_reach(location, player=self.player): evolutions_region.locations.remove(location) if self.multiworld.old_man[self.player] == "early_parcel": diff --git a/worlds/pokemon_rb/client.py b/worlds/pokemon_rb/client.py index 8ed21443e0d4..97ca126476fd 100644 --- a/worlds/pokemon_rb/client.py +++ b/worlds/pokemon_rb/client.py @@ -31,7 +31,7 @@ "CrashCheck2": (0x1617, 1), # Progressive keys, should never be above 10. Just before Dexsanity flags. "CrashCheck3": (0x1A70, 1), - # Route 18 script value. Should never be above 2. Just before Hidden items flags. + # Route 18 Gate script value. Should never be above 3. Just before Hidden items flags. "CrashCheck4": (0x16DD, 1), } @@ -116,7 +116,7 @@ async def game_watcher(self, ctx): or data["CrashCheck1"][0] & 0xF0 or data["CrashCheck1"][1] & 0xFF or data["CrashCheck2"][0] or data["CrashCheck3"][0] > 10 - or data["CrashCheck4"][0] > 2): + or data["CrashCheck4"][0] > 3): # Should mean game crashed logger.warning("Pokémon Red/Blue game may have crashed. Disconnecting from server.") self.game_state = False diff --git a/worlds/pokemon_rb/locations.py b/worlds/pokemon_rb/locations.py index abaa58fcf901..b7b7e533a5ee 100644 --- a/worlds/pokemon_rb/locations.py +++ b/worlds/pokemon_rb/locations.py @@ -175,7 +175,7 @@ def __init__(self, flag): LocationData("Route 2-SE", "South Item", "Moon Stone", rom_addresses["Missable_Route_2_Item_1"], Missable(25)), LocationData("Route 2-SE", "North Item", "HP Up", rom_addresses["Missable_Route_2_Item_2"], Missable(26)), - LocationData("Route 4-E", "Item", "TM04 Whirlwind", rom_addresses["Missable_Route_4_Item"], Missable(27)), + LocationData("Route 4-C", "Item", "TM04 Whirlwind", rom_addresses["Missable_Route_4_Item"], Missable(27)), LocationData("Route 9", "Item", "TM30 Teleport", rom_addresses["Missable_Route_9_Item"], Missable(28)), LocationData("Route 12-N", "Island Item", "TM16 Pay Day", rom_addresses["Missable_Route_12_Item_1"], Missable(30)), LocationData("Route 12-Grass", "Item Behind Cuttable Tree", "Iron", rom_addresses["Missable_Route_12_Item_2"], Missable(31)), diff --git a/worlds/pokemon_rb/pokemon.py b/worlds/pokemon_rb/pokemon.py index 267f424ca89a..28098a2c53fe 100644 --- a/worlds/pokemon_rb/pokemon.py +++ b/worlds/pokemon_rb/pokemon.py @@ -1,5 +1,5 @@ from copy import deepcopy -from . import poke_data +from . import poke_data, logic from .rom_addresses import rom_addresses @@ -135,7 +135,6 @@ def process_pokemon_data(self): learnsets = deepcopy(poke_data.learnsets) tms_hms = self.local_tms + poke_data.hm_moves - compat_hms = set() for mon, mon_data in local_poke_data.items(): @@ -323,19 +322,20 @@ def roll_tm_compat(roll_move): mon_data["tms"][int(flag / 8)] &= ~(1 << (flag % 8)) hm_verify = ["Surf", "Strength"] - if self.multiworld.accessibility[self.player] == "locations" or ((not + if self.multiworld.accessibility[self.player] != "minimal" or ((not self.multiworld.badgesanity[self.player]) and max(self.multiworld.elite_four_badges_condition[self.player], self.multiworld.route_22_gate_condition[self.player], self.multiworld.victory_road_condition[self.player]) > 7) or (self.multiworld.door_shuffle[self.player] not in ("off", "simple")): hm_verify += ["Cut"] - if self.multiworld.accessibility[self.player] == "locations" or (not + if self.multiworld.accessibility[self.player] != "minimal" or (not self.multiworld.dark_rock_tunnel_logic[self.player]) and ((self.multiworld.trainersanity[self.player] or self.multiworld.extra_key_items[self.player]) or self.multiworld.door_shuffle[self.player]): hm_verify += ["Flash"] - # Fly does not need to be verified. Full/Insanity door shuffle connects reachable regions to unreachable regions, - # so if Fly is available and can be learned, the towns you can fly to would be reachable, but if no Pokémon can - # learn it this simply would not occur + # Fly does not need to be verified. Full/Insanity/Decoupled door shuffle connects reachable regions to unreachable + # regions, so if Fly is available and can be learned, the towns you can fly to would be considered reachable for + # door shuffle purposes, but if no Pokémon can learn it, that connection would just be out of logic and it would + # ensure connections to those towns. for hm_move in hm_verify: if hm_move not in compat_hms: @@ -346,3 +346,90 @@ def roll_tm_compat(roll_move): self.local_poke_data = local_poke_data self.learnsets = learnsets + + +def verify_hm_moves(multiworld, world, player): + def intervene(move, test_state): + move_bit = pow(2, poke_data.hm_moves.index(move) + 2) + viable_mons = [mon for mon in world.local_poke_data if world.local_poke_data[mon]["tms"][6] & move_bit] + if multiworld.randomize_wild_pokemon[player] and viable_mons: + accessible_slots = [loc for loc in multiworld.get_reachable_locations(test_state, player) if + loc.type == "Wild Encounter"] + + def number_of_zones(mon): + zones = set() + for loc in [slot for slot in accessible_slots if slot.item.name == mon]: + zones.add(loc.name.split(" - ")[0]) + return len(zones) + + placed_mons = [slot.item.name for slot in accessible_slots] + + if multiworld.area_1_to_1_mapping[player]: + placed_mons.sort(key=lambda i: number_of_zones(i)) + else: + # this sort method doesn't work if you reference the same list being sorted in the lambda + placed_mons_copy = placed_mons.copy() + placed_mons.sort(key=lambda i: placed_mons_copy.count(i)) + + placed_mon = placed_mons.pop() + replace_mon = multiworld.random.choice(viable_mons) + replace_slot = multiworld.random.choice([slot for slot in accessible_slots if slot.item.name + == placed_mon]) + if multiworld.area_1_to_1_mapping[player]: + zone = " - ".join(replace_slot.name.split(" - ")[:-1]) + replace_slots = [slot for slot in accessible_slots if slot.name.startswith(zone) and slot.item.name + == placed_mon] + for replace_slot in replace_slots: + replace_slot.item = world.create_item(replace_mon) + else: + replace_slot.item = world.create_item(replace_mon) + else: + tms_hms = world.local_tms + poke_data.hm_moves + flag = tms_hms.index(move) + mon_list = [mon for mon in poke_data.pokemon_data.keys() if test_state.has(mon, player)] + multiworld.random.shuffle(mon_list) + mon_list.sort(key=lambda mon: world.local_move_data[move]["type"] not in + [world.local_poke_data[mon]["type1"], world.local_poke_data[mon]["type2"]]) + for mon in mon_list: + if test_state.has(mon, player): + world.local_poke_data[mon]["tms"][int(flag / 8)] |= 1 << (flag % 8) + break + + last_intervene = None + while True: + intervene_move = None + test_state = multiworld.get_all_state(False) + if not logic.can_learn_hm(test_state, "Surf", player): + intervene_move = "Surf" + elif not logic.can_learn_hm(test_state, "Strength", player): + intervene_move = "Strength" + # cut may not be needed if accessibility is minimal, unless you need all 8 badges and badgesanity is off, + # as you will require cut to access celadon gyn + elif ((not logic.can_learn_hm(test_state, "Cut", player)) and + (multiworld.accessibility[player] != "minimal" or ((not + multiworld.badgesanity[player]) and max( + multiworld.elite_four_badges_condition[player], + multiworld.route_22_gate_condition[player], + multiworld.victory_road_condition[player]) + > 7) or (multiworld.door_shuffle[player] not in ("off", "simple")))): + intervene_move = "Cut" + elif ((not logic.can_learn_hm(test_state, "Flash", player)) + and multiworld.dark_rock_tunnel_logic[player] + and (multiworld.accessibility[player] != "minimal" + or multiworld.door_shuffle[player])): + intervene_move = "Flash" + # If no Pokémon can learn Fly, then during door shuffle it would simply not treat the free fly maps + # as reachable, and if on no door shuffle or simple, fly is simply never necessary. + # We only intervene if a Pokémon is able to learn fly but none are reachable, as that would have been + # considered in door shuffle. + elif ((not logic.can_learn_hm(test_state, "Fly", player)) + and multiworld.door_shuffle[player] not in + ("off", "simple") and [world.fly_map, world.town_map_fly_map] != ["Pallet Town", "Pallet Town"]): + intervene_move = "Fly" + if intervene_move: + if intervene_move == last_intervene: + raise Exception(f"Caught in infinite loop attempting to ensure {intervene_move} is available to player {player}") + intervene(intervene_move, test_state) + last_intervene = intervene_move + else: + break \ No newline at end of file diff --git a/worlds/pokemon_rb/regions.py b/worlds/pokemon_rb/regions.py index afeb301c9b94..b8f3d829c69a 100644 --- a/worlds/pokemon_rb/regions.py +++ b/worlds/pokemon_rb/regions.py @@ -1948,7 +1948,7 @@ def create_regions(self): for entrance in reversed(region.exits): if isinstance(entrance, PokemonRBWarp): region.exits.remove(entrance) - multiworld.regions.entrance_cache[self.player] = cache + multiworld.regions.entrance_cache[self.player] = cache.copy() if badge_locs: for loc in badge_locs: loc.item = None From 11073dfdace16dc542202d195047845f57bb7e4e Mon Sep 17 00:00:00 2001 From: Star Rauchenberger Date: Sat, 13 Apr 2024 17:20:31 -0500 Subject: [PATCH 026/153] Lingo: Remove unnecessary player_logic parameters (#3054) A world's player_logic is accessible from the LingoWorld object, so it's not necessary to also pass the LingoPlayerLogic object through every function that uses both. --- worlds/lingo/__init__.py | 2 +- worlds/lingo/regions.py | 38 +++++++++++++---------------- worlds/lingo/rules.py | 52 +++++++++++++++++++--------------------- 3 files changed, 42 insertions(+), 50 deletions(-) diff --git a/worlds/lingo/__init__.py b/worlds/lingo/__init__.py index b749418368d1..25be16699126 100644 --- a/worlds/lingo/__init__.py +++ b/worlds/lingo/__init__.py @@ -63,7 +63,7 @@ def generate_early(self): self.player_logic = LingoPlayerLogic(self) def create_regions(self): - create_regions(self, self.player_logic) + create_regions(self) def create_items(self): pool = [self.create_item(name) for name in self.player_logic.real_items] diff --git a/worlds/lingo/regions.py b/worlds/lingo/regions.py index 464e9a149a2f..5fddabd6894e 100644 --- a/worlds/lingo/regions.py +++ b/worlds/lingo/regions.py @@ -4,7 +4,6 @@ from .datatypes import Room, RoomAndDoor from .items import LingoItem from .locations import LingoLocation -from .player_logic import LingoPlayerLogic from .rules import lingo_can_use_entrance, make_location_lambda from .static_logic import ALL_ROOMS, PAINTINGS @@ -12,14 +11,14 @@ from . import LingoWorld -def create_region(room: Room, world: "LingoWorld", player_logic: LingoPlayerLogic) -> Region: +def create_region(room: Room, world: "LingoWorld") -> Region: new_region = Region(room.name, world.player, world.multiworld) - for location in player_logic.locations_by_room.get(room.name, {}): + for location in world.player_logic.locations_by_room.get(room.name, {}): new_location = LingoLocation(world.player, location.name, location.code, new_region) - new_location.access_rule = make_location_lambda(location, world, player_logic) + new_location.access_rule = make_location_lambda(location, world) new_region.locations.append(new_location) - if location.name in player_logic.event_loc_to_item: - event_name = player_logic.event_loc_to_item[location.name] + if location.name in world.player_logic.event_loc_to_item: + event_name = world.player_logic.event_loc_to_item[location.name] event_item = LingoItem(event_name, ItemClassification.progression, None, world.player) new_location.place_locked_item(event_item) @@ -27,22 +26,21 @@ def create_region(room: Room, world: "LingoWorld", player_logic: LingoPlayerLogi def connect_entrance(regions: Dict[str, Region], source_region: Region, target_region: Region, description: str, - door: Optional[RoomAndDoor], world: "LingoWorld", player_logic: LingoPlayerLogic): + door: Optional[RoomAndDoor], world: "LingoWorld"): connection = Entrance(world.player, description, source_region) - connection.access_rule = lambda state: lingo_can_use_entrance(state, target_region.name, door, world, player_logic) + connection.access_rule = lambda state: lingo_can_use_entrance(state, target_region.name, door, world) source_region.exits.append(connection) connection.connect(target_region) if door is not None: effective_room = target_region.name if door.room is None else door.room - if door.door not in player_logic.item_by_door.get(effective_room, {}): - for region in player_logic.calculate_door_requirements(effective_room, door.door, world).rooms: + if door.door not in world.player_logic.item_by_door.get(effective_room, {}): + for region in world.player_logic.calculate_door_requirements(effective_room, door.door, world).rooms: world.multiworld.register_indirect_condition(regions[region], connection) -def connect_painting(regions: Dict[str, Region], warp_enter: str, warp_exit: str, world: "LingoWorld", - player_logic: LingoPlayerLogic) -> None: +def connect_painting(regions: Dict[str, Region], warp_enter: str, warp_exit: str, world: "LingoWorld") -> None: source_painting = PAINTINGS[warp_enter] target_painting = PAINTINGS[warp_exit] @@ -50,11 +48,10 @@ def connect_painting(regions: Dict[str, Region], warp_enter: str, warp_exit: str source_region = regions[source_painting.room] entrance_name = f"{source_painting.room} to {target_painting.room} ({source_painting.id} Painting)" - connect_entrance(regions, source_region, target_region, entrance_name, source_painting.required_door, world, - player_logic) + connect_entrance(regions, source_region, target_region, entrance_name, source_painting.required_door, world) -def create_regions(world: "LingoWorld", player_logic: LingoPlayerLogic) -> None: +def create_regions(world: "LingoWorld") -> None: regions = { "Menu": Region("Menu", world.player, world.multiworld) } @@ -64,7 +61,7 @@ def create_regions(world: "LingoWorld", player_logic: LingoPlayerLogic) -> None: # Instantiate all rooms as regions with their locations first. for room in ALL_ROOMS: - regions[room.name] = create_region(room, world, player_logic) + regions[room.name] = create_region(room, world) # Connect all created regions now that they exist. for room in ALL_ROOMS: @@ -80,18 +77,17 @@ def create_regions(world: "LingoWorld", player_logic: LingoPlayerLogic) -> None: else: entrance_name += f" (through {room.name} - {entrance.door.door})" - connect_entrance(regions, regions[entrance.room], regions[room.name], entrance_name, entrance.door, world, - player_logic) + connect_entrance(regions, regions[entrance.room], regions[room.name], entrance_name, entrance.door, world) # Add the fake pilgrimage. connect_entrance(regions, regions["Outside The Agreeable"], regions["Pilgrim Antechamber"], "Pilgrimage", - RoomAndDoor("Pilgrim Antechamber", "Pilgrimage"), world, player_logic) + RoomAndDoor("Pilgrim Antechamber", "Pilgrimage"), world) if early_color_hallways: regions["Starting Room"].connect(regions["Outside The Undeterred"], "Early Color Hallways") if painting_shuffle: - for warp_enter, warp_exit in player_logic.painting_mapping.items(): - connect_painting(regions, warp_enter, warp_exit, world, player_logic) + for warp_enter, warp_exit in world.player_logic.painting_mapping.items(): + connect_painting(regions, warp_enter, warp_exit, world) world.multiworld.regions += regions.values() diff --git a/worlds/lingo/rules.py b/worlds/lingo/rules.py index 054c330c450f..4e12938afa26 100644 --- a/worlds/lingo/rules.py +++ b/worlds/lingo/rules.py @@ -2,61 +2,58 @@ from BaseClasses import CollectionState from .datatypes import RoomAndDoor -from .player_logic import AccessRequirements, LingoPlayerLogic, PlayerLocation +from .player_logic import AccessRequirements, PlayerLocation from .static_logic import PROGRESSION_BY_ROOM, PROGRESSIVE_ITEMS if TYPE_CHECKING: from . import LingoWorld -def lingo_can_use_entrance(state: CollectionState, room: str, door: RoomAndDoor, world: "LingoWorld", - player_logic: LingoPlayerLogic): +def lingo_can_use_entrance(state: CollectionState, room: str, door: RoomAndDoor, world: "LingoWorld"): if door is None: return True effective_room = room if door.room is None else door.room - return _lingo_can_open_door(state, effective_room, door.door, world, player_logic) + return _lingo_can_open_door(state, effective_room, door.door, world) -def lingo_can_use_location(state: CollectionState, location: PlayerLocation, world: "LingoWorld", - player_logic: LingoPlayerLogic): - return _lingo_can_satisfy_requirements(state, location.access, world, player_logic) +def lingo_can_use_location(state: CollectionState, location: PlayerLocation, world: "LingoWorld"): + return _lingo_can_satisfy_requirements(state, location.access, world) -def lingo_can_use_mastery_location(state: CollectionState, world: "LingoWorld", player_logic: LingoPlayerLogic): +def lingo_can_use_mastery_location(state: CollectionState, world: "LingoWorld"): satisfied_count = 0 - for access_req in player_logic.mastery_reqs: - if _lingo_can_satisfy_requirements(state, access_req, world, player_logic): + for access_req in world.player_logic.mastery_reqs: + if _lingo_can_satisfy_requirements(state, access_req, world): satisfied_count += 1 return satisfied_count >= world.options.mastery_achievements.value -def lingo_can_use_level_2_location(state: CollectionState, world: "LingoWorld", player_logic: LingoPlayerLogic): +def lingo_can_use_level_2_location(state: CollectionState, world: "LingoWorld"): counted_panels = 0 state.update_reachable_regions(world.player) for region in state.reachable_regions[world.player]: - for access_req, panel_count in player_logic.counting_panel_reqs.get(region.name, []): - if _lingo_can_satisfy_requirements(state, access_req, world, player_logic): + for access_req, panel_count in world.player_logic.counting_panel_reqs.get(region.name, []): + if _lingo_can_satisfy_requirements(state, access_req, world): counted_panels += panel_count if counted_panels >= world.options.level_2_requirement.value - 1: return True # THE MASTER has to be handled separately, because it has special access rules. if state.can_reach("Orange Tower Seventh Floor", "Region", world.player)\ - and lingo_can_use_mastery_location(state, world, player_logic): + and lingo_can_use_mastery_location(state, world): counted_panels += 1 if counted_panels >= world.options.level_2_requirement.value - 1: return True return False -def _lingo_can_satisfy_requirements(state: CollectionState, access: AccessRequirements, world: "LingoWorld", - player_logic: LingoPlayerLogic): +def _lingo_can_satisfy_requirements(state: CollectionState, access: AccessRequirements, world: "LingoWorld"): for req_room in access.rooms: if not state.can_reach(req_room, "Region", world.player): return False for req_door in access.doors: - if not _lingo_can_open_door(state, req_door.room, req_door.door, world, player_logic): + if not _lingo_can_open_door(state, req_door.room, req_door.door, world): return False if len(access.colors) > 0 and world.options.shuffle_colors: @@ -67,15 +64,14 @@ def _lingo_can_satisfy_requirements(state: CollectionState, access: AccessRequir return True -def _lingo_can_open_door(state: CollectionState, room: str, door: str, world: "LingoWorld", - player_logic: LingoPlayerLogic): +def _lingo_can_open_door(state: CollectionState, room: str, door: str, world: "LingoWorld"): """ Determines whether a door can be opened """ - if door not in player_logic.item_by_door.get(room, {}): - return _lingo_can_satisfy_requirements(state, player_logic.door_reqs[room][door], world, player_logic) + if door not in world.player_logic.item_by_door.get(room, {}): + return _lingo_can_satisfy_requirements(state, world.player_logic.door_reqs[room][door], world) - item_name = player_logic.item_by_door[room][door] + item_name = world.player_logic.item_by_door[room][door] if item_name in PROGRESSIVE_ITEMS: progression = PROGRESSION_BY_ROOM[room][door] return state.has(item_name, world.player, progression.index) @@ -83,12 +79,12 @@ def _lingo_can_open_door(state: CollectionState, room: str, door: str, world: "L return state.has(item_name, world.player) -def make_location_lambda(location: PlayerLocation, world: "LingoWorld", player_logic: LingoPlayerLogic): - if location.name == player_logic.mastery_location: - return lambda state: lingo_can_use_mastery_location(state, world, player_logic) +def make_location_lambda(location: PlayerLocation, world: "LingoWorld"): + if location.name == world.player_logic.mastery_location: + return lambda state: lingo_can_use_mastery_location(state, world) if world.options.level_2_requirement > 1\ - and (location.name == "Second Room - ANOTHER TRY" or location.name == player_logic.level_2_location): - return lambda state: lingo_can_use_level_2_location(state, world, player_logic) + and (location.name == "Second Room - ANOTHER TRY" or location.name == world.player_logic.level_2_location): + return lambda state: lingo_can_use_level_2_location(state, world) - return lambda state: lingo_can_use_location(state, location, world, player_logic) + return lambda state: lingo_can_use_location(state, location, world) From fbeba1e470526476ed0a38388e595561a92a1faa Mon Sep 17 00:00:00 2001 From: Scipio Wright Date: Sat, 13 Apr 2024 18:20:52 -0400 Subject: [PATCH 027/153] TUNIC: Error catching for logic bugs in ER (#3082) --- worlds/tunic/__init__.py | 40 +++++++++++++++++++++++++--------------- 1 file changed, 25 insertions(+), 15 deletions(-) diff --git a/worlds/tunic/__init__.py b/worlds/tunic/__init__.py index 3220c6c9347d..bd1ed6d78c17 100644 --- a/worlds/tunic/__init__.py +++ b/worlds/tunic/__init__.py @@ -1,5 +1,5 @@ from typing import Dict, List, Any - +from logging import warning from BaseClasses import Region, Location, Item, Tutorial, ItemClassification from .items import item_name_to_id, item_table, item_name_groups, fool_tiers, filler_items, slot_data_item_names from .locations import location_table, location_name_groups, location_name_to_id, hexagon_locations @@ -123,7 +123,7 @@ def create_items(self) -> None: # Filler items in the item pool available_filler: List[str] = [filler for filler in items_to_create if items_to_create[filler] > 0 and item_table[filler].classification == ItemClassification.filler] - + # Remove filler to make room for other items def remove_filler(amount: int): for _ in range(0, amount): @@ -150,7 +150,7 @@ def remove_filler(amount: int): hexagon_goal = self.options.hexagon_goal extra_hexagons = self.options.extra_hexagon_percentage items_to_create[gold_hexagon] += int((Decimal(100 + extra_hexagons) / 100 * hexagon_goal).to_integral_value(rounding=ROUND_HALF_UP)) - + # Replace pages and normal hexagons with filler for replaced_item in list(filter(lambda item: "Pages" in item or item in hexagon_locations, items_to_create)): filler_name = self.get_filler_item_name() @@ -184,7 +184,7 @@ def create_regions(self) -> None: self.tunic_portal_pairs = {} self.er_portal_hints = {} self.ability_unlocks = randomize_ability_unlocks(self.random, self.options) - + # stuff for universal tracker support, can be ignored for standard gen if hasattr(self.multiworld, "re_gen_passthrough"): if "TUNIC" in self.multiworld.re_gen_passthrough: @@ -245,17 +245,27 @@ def extend_hint_information(self, hint_data: Dict[int, Dict[int, str]]): continue path_to_loc = [] previous_name = "placeholder" - name, connection = paths[location.parent_region] - while connection != ("Menu", None): - name, connection = connection - # for LS entrances, we just want to give the portal name - if "(LS)" in name: - name, _ = name.split(" (LS) ") - # was getting some cases like Library Grave -> Library Grave -> other place - if name in portal_names and name != previous_name: - previous_name = name - path_to_loc.append(name) - hint_text = " -> ".join(reversed(path_to_loc)) + try: + name, connection = paths[location.parent_region] + except KeyError: + # logic bug, proceed with warning since it takes a long time to update AP + warning(f"{location.name} is not logically accessible for " + f"{self.multiworld.get_file_safe_player_name(self.player)}. " + "Creating entrance hint Inaccessible. " + "Please report this to the TUNIC rando devs.") + hint_text = "Inaccessible" + else: + while connection != ("Menu", None): + name, connection = connection + # for LS entrances, we just want to give the portal name + if "(LS)" in name: + name, _ = name.split(" (LS) ") + # was getting some cases like Library Grave -> Library Grave -> other place + if name in portal_names and name != previous_name: + previous_name = name + path_to_loc.append(name) + hint_text = " -> ".join(reversed(path_to_loc)) + if hint_text: hint_data[self.player][location.address] = hint_text From e5eb54fb27be39fe5254f66f2deb7d212eada05e Mon Sep 17 00:00:00 2001 From: Star Rauchenberger Date: Sat, 13 Apr 2024 17:46:11 -0500 Subject: [PATCH 028/153] The Witness: Migrate joke hints to the client (#3049) --- worlds/witness/__init__.py | 20 +---- worlds/witness/hints.py | 179 ------------------------------------- 2 files changed, 3 insertions(+), 196 deletions(-) diff --git a/worlds/witness/__init__.py b/worlds/witness/__init__.py index a506cc074cd7..a9c611acbeb0 100644 --- a/worlds/witness/__init__.py +++ b/worlds/witness/__init__.py @@ -14,7 +14,7 @@ from .data import static_logic as static_witness_logic from .data.item_definition_classes import DoorItemDefinition, ItemData from .data.utils import get_audio_logs -from .hints import CompactItemData, create_all_hints, generate_joke_hints, make_compact_hint_data, make_laser_hints +from .hints import CompactItemData, create_all_hints, make_compact_hint_data, make_laser_hints from .locations import WitnessPlayerLocations, static_witness_locations from .options import TheWitnessOptions from .player_items import WitnessItem, WitnessPlayerItems @@ -319,13 +319,6 @@ def fill_slot_data(self) -> dict: # Audio Log Hints hint_amount = self.options.hint_amount.value - - credits_hint = ( - "This Randomizer is brought to you by\n" - "NewSoupVi, Jarno, blastron,\n" - "jbzdarkid, sigma144, IHNN, oddGarrett, Exempt-Medic.", -1, -1 - ) - audio_logs = get_audio_logs().copy() if hint_amount: @@ -344,15 +337,8 @@ def fill_slot_data(self) -> dict: audio_log = audio_logs.pop() self.log_ids_to_hints[int(audio_log, 16)] = compact_hint_data - if audio_logs: - audio_log = audio_logs.pop() - self.log_ids_to_hints[int(audio_log, 16)] = credits_hint - - joke_hints = generate_joke_hints(self, len(audio_logs)) - - while audio_logs: - audio_log = audio_logs.pop() - self.log_ids_to_hints[int(audio_log, 16)] = joke_hints.pop() + # Client will generate joke hints for these. + self.log_ids_to_hints.update({int(audio_log, 16): ("", -1, -1) for audio_log in audio_logs}) # Options for the client & auto-tracker diff --git a/worlds/witness/hints.py b/worlds/witness/hints.py index 786b52d68848..28631438938e 100644 --- a/worlds/witness/hints.py +++ b/worlds/witness/hints.py @@ -12,181 +12,6 @@ CompactItemData = Tuple[str, Union[str, int], int] -joke_hints = [ - "Have you tried Adventure?\n...Holy crud, that game is 17 years older than me.", - "Have you tried A Link to the Past?\nThe Archipelago game that started it all!", - "Waiting to get your items?\nTry BK Sudoku! Make progress even while stuck.", - "Have you tried Blasphemous?\nYou haven't? Blasphemy!\n...Sorry. You should try it, though!", - "Have you tried Bumper Stickers?\nDecades after its inception, people are still inventing unique twists on the match-3 genre.", - "Have you tried Bumper Stickers?\nMaybe after spending so much time on this island, you are longing for a simpler puzzle game.", - "Have you tried Celeste 64?\nYou need smol low-poly Madeline in your life. TRUST ME.", - "Have you tried ChecksFinder?\nIf you like puzzles, you might enjoy it!", - "Have you tried Clique?\nIt's certainly a lot less complicated than this game!", - "Have you tried Dark Souls III?\nA tough game like this feels better when friends are helping you!", - "Have you tried Donkey Kong Country 3?\nA legendary game from a golden age of platformers!", - 'Have you tried DLC Quest?\nI know you all like parody games.\nI got way too many requests to make a randomizer for "The Looker".', - "Have you tried Doom?\nI wonder if a smart fridge can connect to Archipelago.", - "Have you tried Doom II?\nGot a good game on your hands? Just make it bigger and better.", - "Have you tried Factorio?\nAlone in an unknown multiworld. Sound familiar?", - "Have you tried Final Fantasy?\nExperience a classic game improved to fit modern standards!", - "Have you tried Final Fantasy Mystic Quest?\nApparently, it was made in an attempt to simplify Final Fantasy for the western market.\nThey were right, I suck at RPGs.", - "Have you tried Heretic?\nWait, there is a Doom Engine game where you can look UP AND DOWN???", - "Have you tried Hollow Knight?\nAnother independent hit revolutionising a genre!", - "Have you tried Hylics 2?\nStop motion might just be the epitome of unique art styles.", - "Have you tried Kirby's Dream Land 3?\nAll good things must come to an end, including Nintendo's SNES library.\nWent out with a bang though!", - "Have you tried Kingdom Hearts II?\nI'll wait for you to name a more epic crossover.", - "Have you tried Link's Awakening DX?\nHopefully, Link won't be obsessed with circles when he wakes up.", - "Have you tried Landstalker?\nThe Witness player's greatest fear: A diagonal movement grid...\nWait, I guess we have the Monastery puzzles.", - "Have you tried Lingo?\nIt's an open world puzzle game. It features puzzle panels with non-verbally explained mechanics.\nIf you like this game, you'll like Lingo too.", - "(Middle Yellow)\nYOU AILED OVERNIGHT\nH--- --- ----- -----?", - "Have you tried Lufia II?\nRoguelites are not just a 2010s phenomenon, turns out.", - "Have you tried Meritous?\nYou should know that obscure games are often groundbreaking!", - "Have you tried The Messenger?\nOld ideas made new again. It's how all art is made.", - "Have you tried Minecraft?\nI have recently learned this is a question that needs to be asked.", - "Have you tried Mega Man Battle Network 3?\nIt's a Mega Man RPG. How could you not want to try that?", - "Have you tried Muse Dash?\nRhythm game with cute girls!\n(Maybe skip if you don't like the Jungle panels)", - "Have you tried Noita?\nIf you like punishing yourself, you will like it.", - "Have you tried Ocarina of Time?\nOne of the biggest randomizers, big inspiration for this one's features!", - "Have you tried Overcooked 2?\nWhen you're done relaxing with puzzles, use your energy to yell at your friends.", - "Have you tried Pokemon Emerald?\nI'm going to say it: 10/10, just the right amount of water.", - "Have you tried Pokemon Red&Blue?\nA cute pet collecting game that fascinated an entire generation.", - "Have you tried Raft?\nHaven't you always wanted to explore the ocean surrounding this island?", - "Have you tried Rogue Legacy?\nAfter solving so many puzzles it's the perfect way to rest your \"thinking\" brain.", - "Have you tried Risk of Rain 2?\nI haven't either. But I hear it's incredible!", - "Have you tried Sonic Adventure 2?\nIf the silence on this island is getting to you, there aren't many games more energetic.", - "Have you tried Starcraft 2?\nUse strategy and management to crush your enemies!", - "Have you tried Shivers?\nWitness 2 should totally feature a haunted museum.", - "Have you tried Super Metroid?\nA classic game, yet still one of the best in the genre.", - "Have you tried Super Mario 64?\n3-dimensional games like this owe everything to that game.", - "Have you tried Super Mario World?\nI don't think I need to tell you that it is beloved by many.", - "Have you tried SMZ3?\nWhy play one incredible game when you can play 2 at once?", - "Have you tried Secret of Evermore?\nI haven't either. But I hear it's great!", - "Have you tried Slay the Spire?\nExperience the thrill of combat without needing fast fingers!", - "Have you tried Stardew Valley?\nThe Farming game that gave a damn. It's so easy to lose hours and days to it...", - "Have you tried Subnautica?\nIf you like this game's lonely atmosphere, I would suggest you try it.", - 'Have you tried Terraria?\nA prime example of a survival sandbox game that beats the "Wide as an ocean, deep as a puddle" allegations.', - "Have you tried Timespinner?\nEveryone who plays it ends up loving it!", - 'Have you tried The Legend of Zelda?\nIn some sense, it was the starting point of "adventure" in video games.', - "Have you tried TUNC?\nWhat? No, I'm pretty sure I spelled that right.", - "Have you tried TUNIC?\nRemember what discovering your first Environmental Puzzle was like?\nTUNIC will make you feel like that at least 5 times over.", - "Have you tried Undertale?\nI hope I'm not the 10th person to ask you that. But it's, like, really good.", - "Have you tried VVVVVV?\nExperience the essence of gaming distilled into its purest form!", - "Have you tried Wargroove?\nI'm glad that for every abandoned series, enough people are yearning for its return that one of them will know how to code.", - "Have you tried The Witness?\nOh. I guess you already have. Thanks for playing!", - "Have you tried Zillion?\nMe neither. But it looks fun. So, let's try something new together?", - 'Have you tried Zork: Grand Inquisitor?\nThis 1997 game uses Z-Vision technology to simulate 3D environments.\nCome on, I know you wanna find out what "Z-Vision" is.', - - "Quaternions break my brain", - "Eclipse has nothing, but you should do it anyway.", - "Beep", - "Putting in custom subtitles shouldn't have been as hard as it was...", - "BK mode is right around the corner.", - "You can do it!", - "I believe in you!", - "The person playing is cute. <3", - "dash dot, dash dash dash,\ndash, dot dot dot dot, dot dot,\ndash dot, dash dash dot", - "When you think about it, there are actually a lot of bubbles in a stream.", - "Never gonna give you up\nNever gonna let you down\nNever gonna run around and desert you", - "Thanks to the Archipelago developers for making this possible.", - "One day I was fascinated by the subject of generation of waves by wind.", - "I don't like sandwiches. Why would you think I like sandwiches? Have you ever seen me with a sandwich?", - "Where are you right now?\nI'm at soup!\nWhat do you mean you're at soup?", - "Remember to ask in the Archipelago Discord what the Functioning Brain does.", - "Don't use your puzzle skips, you might need them later.", - "For an extra challenge, try playing blindfolded.", - "Go to the top of the mountain and see if you can see your house.", - "Yellow = Red + Green\nCyan = Green + Blue\nMagenta = Red + Blue", - "Maybe that panel really is unsolvable.", - "Did you make sure it was plugged in?", - "Do not look into laser with remaining eye.", - "Try pressing Space to jump.", - "The Witness is a Doom clone.\nJust replace the demons with puzzles", - "Test Hint please ignore", - "Shapers can never be placed outside the panel boundaries, even if subtracted.", - "The Keep laser panels use the same trick on both sides!", - "Can't get past a door? Try going around. Can't go around? Try building a nether portal.", - "We've been trying to reach you about your car's extended warranty.", - "I hate this game. I hate this game. I hate this game.\n- Chess player Bobby Fischer", - "Dear Mario,\nPlease come to the castle. I've baked a cake for you!", - "Have you tried waking up?\nYeah, me neither.", - "Why do they call it The Witness, when wit game the player view play of with the game.", - "THE WIND FISH IN NAME ONLY, FOR IT IS NEITHER", - "Like this game?\nTry The Wit.nes, Understand, INSIGHT, Taiji What the Witness?, and Tametsi.", - "In a race, It's survival of the Witnesst.", - "This hint has been removed. We apologize for your inconvenience.", - "O-----------", - "Circle is draw\nSquare is separate\nLine is win", - "Circle is draw\nStar is pair\nLine is win", - "Circle is draw\nCircle is copy\nLine is win", - "Circle is draw\nDot is eat\nLine is win", - "Circle is start\nWalk is draw\nLine is win", - "Circle is start\nLine is win\nWitness is you", - "Can't find any items?\nConsider a relaxing boat trip around the island!", - "Don't forget to like, comment, and subscribe.", - "Ah crap, gimme a second.\n[papers rustling]\nSorry, nothing.", - "Trying to get a hint? Too bad.", - "Here's a hint: Get good at the game.", - "I'm still not entirely sure what we're witnessing here.", - "Have you found a red page yet? No? Then have you found a blue page?", - "And here we see the Witness player, seeking answers where there are none-\nDid someone turn on the loudspeaker?", - - "Be quiet. I can't hear the elevator.", - "Witness me.\n- The famous last words of John Witness.", - "It's okay, I always have to skip the Rotated Shaper puzzles too.", - "Alan please add hint.", - "Rumor has it there's an audio log with a hint nearby.", - "In the future, war will break out between obelisk_sides and individual EP players.\nWhich side are you on?", - "Droplets: Low, High, Mid.\nAmbience: Mid, Low, Mid, High.", - "Name a better game involving lines. I'll wait.", - '"You have to draw a line in the sand."\n- Arin "Egoraptor" Hanson', - "Have you tried?\nThe puzzles tend to get easier if you do.", - "Sorry, I accidentally left my phone in the Jungle.\nAnd also all my fragile dishes.", - 'Winner of the "Most Irrelevant PR in AP History" award!', - "I bet you wish this was a real hint :)", - "\"This hint is an impostor.\"- Junk hint submitted by T1mshady.\n...wait, I'm not supposed to say that part?", - "Wouldn't you like to know, weather buoy?", - "Give me a few minutes, I should have better material by then.", - "Just pet the doggy! You know you want to!!!", - "ceci n'est pas une metroidvania", - "HINT is MELT\nYOU is HOT", - "Who's that behind you?", - ":3", - "^v ^^v> >>^>v\n^^v>v ^v>> v>^> v>v^", - "Statement #0162601, regarding a strange island that--\nOh, wait, sorry. I'm not supposed to be here.", - "Hollow Bastion has 6 progression items.\nOr maybe it doesn't.\nI wouldn't know.", - "Set your hint count lower so I can tell you more jokes next time.", - "A non-edge start point is similar to a cat.\nIt must be either inside or outside, it can't be both.", - "What if we kissed on the Bunker Laser Platform?\nJk... unless?", - "You don't have Boat? Invisible boat time!\nYou do have boat? Boat clipping time!", - "Cet indice est en français. Nous nous excusons de tout inconvénients engendrés par cela.", - "How many of you have personally witnessed a total solar eclipse?", - "In the Treehouse area, you will find 69 progression items.\nNice.\n(Source: Just trust me)", - "Lingo\nLingoing\nLingone", - "The name of the captain was Albert Einstein.", - "Panel impossible Sigma plz fix", - "Welcome Back! (:", - "R R R U L L U L U R U R D R D R U U", - "Have you tried checking your tracker?", - "Lines are drawn on grids\nAll symbols must be obeyed\nIt's snowing on Mt. Fuji", - "If you're BK, you could try today's Wittle:\nhttps://www.fourisland.com/wittle/", - "They say that plundering Outside Ganon's Castle is a foolish choice.", - "You should try to BLJ. Maybe that'll get you through that door.", - "Error: Witness Randomizer disconnected from Archipelago.\n(lmao gottem)", - "You have found: One (1) Audio Log!\nSeries of 49! Collect them all!", - "In the Town area, you will find 1 good boi.\nGo pet him.", - "If you're ever stuck on a panel, feel free to ask Rever.\nSurely you'll understand his drawing!", - "[This hint has been removed as part of the Witness Protection Program]", - "Panel Diddle", - "Witness AP when", - "This game is my favorite walking simulator.", - "Did you hear that? It said --\n\nCosmic background radiation is a riot!", - "Well done solving those puzzles.\nPray return to the Waking Sands.", - "Having trouble finding your checks?\nTry the PopTracker pack!\nIt's got auto-tracking and a detailed map.", - - "Hints suggested by:\nIHNN, Beaker, MrPokemon11, Ember, TheM8, NewSoupVi, Jasper Bird, T1mshady, " - "KF, Yoshi348, Berserker, BowlinJim, oddGarrett, Pink Switch, Rever, Ishigh, snolid.", -] - @dataclass class WitnessLocationHint: @@ -502,10 +327,6 @@ def make_extra_location_hints(world: "WitnessWorld", hint_amount: int, own_itemp return hints -def generate_joke_hints(world: "WitnessWorld", amount: int) -> List[Tuple[str, int, int]]: - return [(x, -1, -1) for x in world.random.sample(joke_hints, amount)] - - def choose_areas(world: "WitnessWorld", amount: int, locations_per_area: Dict[str, List[Location]], already_hinted_locations: Set[Location]) -> Tuple[List[str], Dict[str, Set[Location]]]: """ From c8fd42f938aa349c58f74a76327ef596bc269ed6 Mon Sep 17 00:00:00 2001 From: agilbert1412 Date: Sun, 14 Apr 2024 01:46:41 +0300 Subject: [PATCH 029/153] Stardew Valley: Remove early shipping bin documentation (#3126) --- worlds/stardew_valley/options.py | 1 - 1 file changed, 1 deletion(-) diff --git a/worlds/stardew_valley/options.py b/worlds/stardew_valley/options.py index 055407d97d4a..c1bd7a25c228 100644 --- a/worlds/stardew_valley/options.py +++ b/worlds/stardew_valley/options.py @@ -268,7 +268,6 @@ class BuildingProgression(Choice): Vanilla: You can buy each building normally. Progressive: You will receive the buildings and will be able to build the first one of each type for free, once it is received. If you want more of the same building, it will cost the vanilla price. - Progressive early shipping bin: Same as Progressive, but the shipping bin will be placed early in the multiworld. Cheap: Buildings will cost half as much Very Cheap: Buildings will cost 1/5th as much """ From 56ec0e902d451e005ce3db0e86da508e68e4948b Mon Sep 17 00:00:00 2001 From: Phaneros <31861583+MatthewMarinets@users.noreply.github.com> Date: Sat, 13 Apr 2024 16:09:01 -0700 Subject: [PATCH 030/153] sc2: Fixing mission levels not counting towards the level 35 threshold to unlock primal kerrigan (#3109) --- worlds/sc2/Client.py | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/worlds/sc2/Client.py b/worlds/sc2/Client.py index fe6efb9c3035..96b3ddc66b44 100644 --- a/worlds/sc2/Client.py +++ b/worlds/sc2/Client.py @@ -957,13 +957,13 @@ def caclulate_soa_options(ctx: SC2Context) -> int: return options -def kerrigan_primal(ctx: SC2Context, items: typing.Dict[SC2Race, typing.List[int]]) -> bool: +def kerrigan_primal(ctx: SC2Context, kerrigan_level: int) -> bool: if ctx.kerrigan_primal_status == KerriganPrimalStatus.option_always_zerg: return True elif ctx.kerrigan_primal_status == KerriganPrimalStatus.option_always_human: return False elif ctx.kerrigan_primal_status == KerriganPrimalStatus.option_level_35: - return items[SC2Race.ZERG][type_flaggroups[SC2Race.ZERG]["Level"]] >= 35 + return kerrigan_level >= 35 elif ctx.kerrigan_primal_status == KerriganPrimalStatus.option_half_completion: total_missions = len(ctx.mission_id_to_location_ids) completed = len([(mission_id * VICTORY_MODULO + get_location_offset(mission_id)) in ctx.checked_locations @@ -1138,7 +1138,7 @@ async def updateTerranTech(self, current_items): async def updateZergTech(self, current_items, kerrigan_level): zerg_items = current_items[SC2Race.ZERG] - kerrigan_primal_by_items = kerrigan_primal(self.ctx, current_items) + kerrigan_primal_by_items = kerrigan_primal(self.ctx, kerrigan_level) kerrigan_primal_bot_value = 1 if kerrigan_primal_by_items else 0 await self.chat_send("?GiveZergTech {} {} {} {} {} {} {} {} {} {} {} {}".format( kerrigan_level, kerrigan_primal_bot_value, zerg_items[0], zerg_items[1], zerg_items[2], From feaae1db125fd2d8712b677abd1d979349f754ef Mon Sep 17 00:00:00 2001 From: Scipio Wright Date: Sat, 13 Apr 2024 19:21:20 -0400 Subject: [PATCH 031/153] Noita: Do some cleanup to make mypy happy (#3114) --- worlds/noita/__init__.py | 2 +- worlds/noita/locations.py | 2 +- worlds/noita/regions.py | 2 +- worlds/noita/rules.py | 4 ++-- 4 files changed, 5 insertions(+), 5 deletions(-) diff --git a/worlds/noita/__init__.py b/worlds/noita/__init__.py index b8f8e4ae8346..43078c5e4320 100644 --- a/worlds/noita/__init__.py +++ b/worlds/noita/__init__.py @@ -38,7 +38,7 @@ class NoitaWorld(World): web = NoitaWeb() - def generate_early(self): + def generate_early(self) -> None: if not self.multiworld.get_player_name(self.player).isascii(): raise Exception("Noita yaml's slot name has invalid character(s).") diff --git a/worlds/noita/locations.py b/worlds/noita/locations.py index afe16c54e4b2..cf91ba44fb7a 100644 --- a/worlds/noita/locations.py +++ b/worlds/noita/locations.py @@ -12,7 +12,7 @@ class NoitaLocation(Location): class LocationData(NamedTuple): id: int flag: int = 0 - ltype: Optional[str] = "shop" + ltype: str = "shop" class LocationFlag(IntEnum): diff --git a/worlds/noita/regions.py b/worlds/noita/regions.py index 6a9c86772381..3b7fd3962c89 100644 --- a/worlds/noita/regions.py +++ b/worlds/noita/regions.py @@ -41,7 +41,7 @@ def create_regions(world: "NoitaWorld") -> Dict[str, Region]: # An "Entrance" is really just a connection between two regions -def create_entrance(player: int, source: str, destination: str, regions: Dict[str, Region]): +def create_entrance(player: int, source: str, destination: str, regions: Dict[str, Region]) -> Entrance: entrance = Entrance(player, f"From {source} To {destination}", regions[source]) entrance.connect(regions[destination]) return entrance diff --git a/worlds/noita/rules.py b/worlds/noita/rules.py index 95039bee4635..65871a804ea0 100644 --- a/worlds/noita/rules.py +++ b/worlds/noita/rules.py @@ -68,7 +68,7 @@ def has_orb_count(state: CollectionState, player: int, amount: int) -> bool: return state.count("Orb", player) >= amount -def forbid_items_at_locations(world: "NoitaWorld", shop_locations: Set[str], forbidden_items: Set[str]): +def forbid_items_at_locations(world: "NoitaWorld", shop_locations: Set[str], forbidden_items: Set[str]) -> None: for shop_location in shop_locations: location = world.multiworld.get_location(shop_location, world.player) GenericRules.forbid_items_for_player(location, forbidden_items, world.player) @@ -129,7 +129,7 @@ def holy_mountain_unlock_conditions(world: "NoitaWorld") -> None: ) -def biome_unlock_conditions(world: "NoitaWorld"): +def biome_unlock_conditions(world: "NoitaWorld") -> None: lukki_entrances = world.multiworld.get_region("Lukki Lair", world.player).entrances magical_entrances = world.multiworld.get_region("Magical Temple", world.player).entrances wizard_entrances = world.multiworld.get_region("Wizards' Den", world.player).entrances From 3d5c21cec5f212e9e20c7caa078cf194bfcf12dc Mon Sep 17 00:00:00 2001 From: Ziktofel Date: Sun, 14 Apr 2024 01:44:51 +0200 Subject: [PATCH 032/153] SC2: Remove the deprecated data version attribute in order to avoid cached old item names (#3040) --- worlds/sc2/__init__.py | 1 - 1 file changed, 1 deletion(-) diff --git a/worlds/sc2/__init__.py b/worlds/sc2/__init__.py index fffa618d2694..59c6fe900197 100644 --- a/worlds/sc2/__init__.py +++ b/worlds/sc2/__init__.py @@ -42,7 +42,6 @@ class SC2World(World): game = "Starcraft 2" web = Starcraft2WebWorld() - data_version = 6 item_name_to_id = {name: data.code for name, data in get_full_item_list().items()} location_name_to_id = {location.name: location.code for location in get_locations(None)} From fb3035a78b39c827d158586db1e6103db463a69e Mon Sep 17 00:00:00 2001 From: Scipio Wright Date: Sat, 13 Apr 2024 20:06:06 -0400 Subject: [PATCH 033/153] TUNIC: Some cleanup (#3115) --- worlds/tunic/__init__.py | 4 ++-- worlds/tunic/er_rules.py | 2 +- worlds/tunic/er_scripts.py | 4 ++-- worlds/tunic/test/__init__.py | 2 +- worlds/tunic/test/test_access.py | 14 +++++++------- 5 files changed, 13 insertions(+), 13 deletions(-) diff --git a/worlds/tunic/__init__.py b/worlds/tunic/__init__.py index bd1ed6d78c17..77324b2047b4 100644 --- a/worlds/tunic/__init__.py +++ b/worlds/tunic/__init__.py @@ -125,7 +125,7 @@ def create_items(self) -> None: item_table[filler].classification == ItemClassification.filler] # Remove filler to make room for other items - def remove_filler(amount: int): + def remove_filler(amount: int) -> None: for _ in range(0, amount): if not available_filler: fill = "Fool Trap" @@ -231,7 +231,7 @@ def set_rules(self) -> None: def get_filler_item_name(self) -> str: return self.random.choice(filler_items) - def extend_hint_information(self, hint_data: Dict[int, Dict[int, str]]): + def extend_hint_information(self, hint_data: Dict[int, Dict[int, str]]) -> None: if self.options.entrance_rando: hint_data.update({self.player: {}}) # all state seems to have efficient paths diff --git a/worlds/tunic/er_rules.py b/worlds/tunic/er_rules.py index 96a3c39ad283..09972db2e5cc 100644 --- a/worlds/tunic/er_rules.py +++ b/worlds/tunic/er_rules.py @@ -991,7 +991,7 @@ def set_er_region_rules(world: "TunicWorld", ability_unlocks: Dict[str, int], re # connecting the regions portals are in to other portals you can access via ladder storage # using has_stick instead of can_ladder_storage since it's already checking the logic rules if options.logic_rules == "unrestricted": - def get_portal_info(portal_sd: str) -> (str, str): + def get_portal_info(portal_sd: str) -> Tuple[str, str]: for portal1, portal2 in portal_pairs.items(): if portal1.scene_destination() == portal_sd: return portal1.name, portal2.region diff --git a/worlds/tunic/er_scripts.py b/worlds/tunic/er_scripts.py index 5d08188ace6e..ffd3ae30de4e 100644 --- a/worlds/tunic/er_scripts.py +++ b/worlds/tunic/er_scripts.py @@ -22,13 +22,13 @@ class TunicERLocation(Location): def create_er_regions(world: "TunicWorld") -> Dict[Portal, Portal]: regions: Dict[str, Region] = {} if world.options.entrance_rando: - portal_pairs: Dict[Portal, Portal] = pair_portals(world) + portal_pairs = pair_portals(world) # output the entrances to the spoiler log here for convenience for portal1, portal2 in portal_pairs.items(): world.multiworld.spoiler.set_entrance(portal1.name, portal2.name, "both", world.player) else: - portal_pairs: Dict[Portal, Portal] = vanilla_portals() + portal_pairs = vanilla_portals() for region_name, region_data in tunic_er_regions.items(): regions[region_name] = Region(region_name, world.player, world.multiworld) diff --git a/worlds/tunic/test/__init__.py b/worlds/tunic/test/__init__.py index d7ae47f7d74c..d0b68955c538 100644 --- a/worlds/tunic/test/__init__.py +++ b/worlds/tunic/test/__init__.py @@ -3,4 +3,4 @@ class TunicTestBase(WorldTestBase): game = "TUNIC" - player: int = 1 \ No newline at end of file + player = 1 diff --git a/worlds/tunic/test/test_access.py b/worlds/tunic/test/test_access.py index 1c4f06d50461..72d4a498d1ee 100644 --- a/worlds/tunic/test/test_access.py +++ b/worlds/tunic/test/test_access.py @@ -4,14 +4,14 @@ class TestAccess(TunicTestBase): # test whether you can get into the temple without laurels - def test_temple_access(self): + def test_temple_access(self) -> None: self.collect_all_but(["Hero's Laurels", "Lantern"]) self.assertFalse(self.can_reach_location("Sealed Temple - Page Pickup")) self.collect_by_name(["Lantern"]) self.assertTrue(self.can_reach_location("Sealed Temple - Page Pickup")) # test that the wells function properly. Since fairies is written the same way, that should succeed too - def test_wells(self): + def test_wells(self) -> None: self.collect_all_but(["Golden Coin"]) self.assertFalse(self.can_reach_location("Coins in the Well - 3 Coins")) self.collect_by_name(["Golden Coin"]) @@ -22,7 +22,7 @@ class TestStandardShuffle(TunicTestBase): options = {options.AbilityShuffling.internal_name: options.AbilityShuffling.option_true} # test that you need to get holy cross to open the hc door in overworld - def test_hc_door(self): + def test_hc_door(self) -> None: self.assertFalse(self.can_reach_location("Fountain Cross Door - Page Pickup")) self.collect_by_name("Pages 42-43 (Holy Cross)") self.assertTrue(self.can_reach_location("Fountain Cross Door - Page Pickup")) @@ -33,7 +33,7 @@ class TestHexQuestShuffle(TunicTestBase): options.AbilityShuffling.internal_name: options.AbilityShuffling.option_true} # test that you need the gold questagons to open the hc door in overworld - def test_hc_door_hex_shuffle(self): + def test_hc_door_hex_shuffle(self) -> None: self.assertFalse(self.can_reach_location("Fountain Cross Door - Page Pickup")) self.collect_by_name("Gold Questagon") self.assertTrue(self.can_reach_location("Fountain Cross Door - Page Pickup")) @@ -44,7 +44,7 @@ class TestHexQuestNoShuffle(TunicTestBase): options.AbilityShuffling.internal_name: options.AbilityShuffling.option_false} # test that you can get the item behind the overworld hc door with nothing and no ability shuffle - def test_hc_door_no_shuffle(self): + def test_hc_door_no_shuffle(self) -> None: self.assertTrue(self.can_reach_location("Fountain Cross Door - Page Pickup")) @@ -52,7 +52,7 @@ class TestNormalGoal(TunicTestBase): options = {options.HexagonQuest.internal_name: options.HexagonQuest.option_false} # test that you need the three colored hexes to reach the Heir in standard - def test_normal_goal(self): + def test_normal_goal(self) -> None: location = ["The Heir"] items = [["Red Questagon", "Blue Questagon", "Green Questagon"]] self.assertAccessDependency(location, items) @@ -63,7 +63,7 @@ class TestER(TunicTestBase): options.AbilityShuffling.internal_name: options.AbilityShuffling.option_true, options.HexagonQuest.internal_name: options.HexagonQuest.option_false} - def test_overworld_hc_chest(self): + def test_overworld_hc_chest(self) -> None: # test to see that static connections are working properly -- this chest requires holy cross and is in Overworld self.assertFalse(self.can_reach_location("Overworld - [Southwest] Flowers Holy Cross")) self.collect_by_name(["Pages 42-43 (Holy Cross)"]) From f5ff00536076316a4dcb9de56574218a21f3103e Mon Sep 17 00:00:00 2001 From: Seldom <38388947+Seldom-SE@users.noreply.github.com> Date: Sat, 13 Apr 2024 17:18:02 -0700 Subject: [PATCH 034/153] Terraria: Crate logic (#2841) --- worlds/terraria/Checks.py | 111 ++++++++++++++++++------------------ worlds/terraria/Rules.dsv | 14 ++--- worlds/terraria/__init__.py | 2 + 3 files changed, 64 insertions(+), 63 deletions(-) diff --git a/worlds/terraria/Checks.py b/worlds/terraria/Checks.py index b6be45258c5d..0630d6290be0 100644 --- a/worlds/terraria/Checks.py +++ b/worlds/terraria/Checks.py @@ -177,6 +177,7 @@ def validate_conditions( if condition not in { "npc", "calamity", + "grindy", "pickaxe", "hammer", "mech_boss", @@ -221,62 +222,60 @@ def mark_progression( mark_progression(conditions, progression, rules, rule_indices, loc_to_item) -def read_data() -> ( - Tuple[ - # Goal to rule index that ends that goal's range and the locations required - List[Tuple[int, Set[str]]], - # Rules - List[ - Tuple[ - # Rule - str, - # Flag to flag arg - Dict[str, Union[str, int, None]], - # True = or, False = and, None = N/A - Union[bool, None], - # Conditions - List[ - Tuple[ - # True = positive, False = negative - bool, - # Condition type - int, - # Condition name or list (True = or, False = and, None = N/A) (list shares type with outer) - Union[str, Tuple[Union[bool, None], List]], - # Condition arg - Union[str, int, None], - ] - ], - ] - ], - # Rule to rule index - Dict[str, int], - # Label to rewards - Dict[str, List[str]], - # Reward to flags - Dict[str, Set[str]], - # Item name to ID - Dict[str, int], - # Location name to ID - Dict[str, int], - # NPCs - List[str], - # Pickaxe to pick power - Dict[str, int], - # Hammer to hammer power - Dict[str, int], - # Mechanical bosses - List[str], - # Calamity final bosses - List[str], - # Progression rules - Set[str], - # Armor to minion count, - Dict[str, int], - # Accessory to minion count, - Dict[str, int], - ] -): +def read_data() -> Tuple[ + # Goal to rule index that ends that goal's range and the locations required + List[Tuple[int, Set[str]]], + # Rules + List[ + Tuple[ + # Rule + str, + # Flag to flag arg + Dict[str, Union[str, int, None]], + # True = or, False = and, None = N/A + Union[bool, None], + # Conditions + List[ + Tuple[ + # True = positive, False = negative + bool, + # Condition type + int, + # Condition name or list (True = or, False = and, None = N/A) (list shares type with outer) + Union[str, Tuple[Union[bool, None], List]], + # Condition arg + Union[str, int, None], + ] + ], + ] + ], + # Rule to rule index + Dict[str, int], + # Label to rewards + Dict[str, List[str]], + # Reward to flags + Dict[str, Set[str]], + # Item name to ID + Dict[str, int], + # Location name to ID + Dict[str, int], + # NPCs + List[str], + # Pickaxe to pick power + Dict[str, int], + # Hammer to hammer power + Dict[str, int], + # Mechanical bosses + List[str], + # Calamity final bosses + List[str], + # Progression rules + Set[str], + # Armor to minion count, + Dict[str, int], + # Accessory to minion count, + Dict[str, int], +]: next_id = 0x7E0000 item_name_to_id = {} diff --git a/worlds/terraria/Rules.dsv b/worlds/terraria/Rules.dsv index 38ca4e575f38..322bf9c5d3a3 100644 --- a/worlds/terraria/Rules.dsv +++ b/worlds/terraria/Rules.dsv @@ -234,9 +234,9 @@ Spider Armor; ArmorMinions(3); Cross Necklace; ; Wall of Flesh; Altar; ; Wall of Flesh & @hammer(80); Begone, Evil!; Achievement; Altar; -Cobalt Ore; ; ((~@calamity & Altar) | (@calamity & Wall of Flesh)) & @pickaxe(100); +Cobalt Ore; ; (((~@calamity & Altar) | (@calamity & Wall of Flesh)) & @pickaxe(100)) | Wall of Flesh; Extra Shiny!; Achievement; Cobalt Ore | Mythril Ore | Adamantite Ore | Chlorophyte Ore; -Cobalt Bar; ; Cobalt Ore; +Cobalt Bar; ; Cobalt Ore | Wall of Flesh; Cobalt Pickaxe; Pickaxe(110); Cobalt Bar; Soul of Night; ; Wall of Flesh | (@calamity & Altar); Hallow; ; Wall of Flesh; @@ -249,7 +249,7 @@ Blessed Apple; ; Rod of Discord; ; Hallow; Gelatin World Tour; Achievement | Grindy; Dungeon & Wall of Flesh & Hallow & #King Slime; Soul of Flight; ; Wall of Flesh; -Head in the Clouds; Achievement; (Soul of Flight & ((Hardmode Anvil & (Soul of Light | Soul of Night | Pixie Dust | Wall of Flesh | Solar Eclipse | @mech_boss(1) | Plantera | Spectre Bar | #Golem)) | (Shroomite Bar & Autohammer) | #Mourning Wood | #Pumpking)) | Steampunker | (Wall of Flesh & Witch Doctor) | (Solar Eclipse & Plantera) | #Everscream | #Old One's Army Tier 3 | #Empress of Light | #Duke Fishron | (Fragment & Luminite Bar & Ancient Manipulator); // Leaf Wings are Post-Plantera in 1.4.4 +Head in the Clouds; Achievement; @grindy | (Soul of Flight & ((Hardmode Anvil & (Soul of Light | Soul of Night | Pixie Dust | Wall of Flesh | Solar Eclipse | @mech_boss(1) | Plantera | Spectre Bar | #Golem)) | (Shroomite Bar & Autohammer) | #Mourning Wood | #Pumpking)) | Steampunker | (Wall of Flesh & Witch Doctor) | (Solar Eclipse & Plantera) | #Everscream | #Old One's Army Tier 3 | #Empress of Light | #Duke Fishron | (Fragment & Luminite Bar & Ancient Manipulator); // Leaf Wings are Post-Plantera in 1.4.4 Bunny; Npc; Zoologist & Wall of Flesh; // Extremely simplified Forbidden Fragment; ; Sandstorm & Wall of Flesh; Astral Infection; Calamity; Wall of Flesh; @@ -274,13 +274,13 @@ Pirate; Npc; Queen Slime; Location | Item; Hallow; // Aquatic Scourge -Mythril Ore; ; ((~@calamity & Altar) | (@calamity & @mech_boss(1))) & @pickaxe(110); -Mythril Bar; ; Mythril Ore; +Mythril Ore; ; (((~@calamity & Altar) | (@calamity & @mech_boss(1))) & @pickaxe(110)) | (Wall of Flesh & (~@calamity | @mech_boss(1))); +Mythril Bar; ; Mythril Ore | (Wall of Flesh & (~@calamity | @mech_boss(1))); Hardmode Anvil; ; Mythril Bar; Mythril Pickaxe; Pickaxe(150); Hardmode Anvil & Mythril Bar; -Adamantite Ore; ; ((~@calamity & Altar) | (@calamity & @mech_boss(2))) & @pickaxe(150); +Adamantite Ore; ; (((~@calamity & Altar) | (@calamity & @mech_boss(2))) & @pickaxe(150)) | (Wall of Flesh & (~@calamity | @mech_boss(2))); Hardmode Forge; ; Hardmode Anvil & Adamantite Ore & Hellforge; -Adamantite Bar; ; Hardmode Forge & Adamantite Ore; +Adamantite Bar; ; (Hardmode Forge & Adamantite Ore) | (Wall of Flesh & (~@calamity | @mech_boss(2))); Adamantite Pickaxe; Pickaxe(180); Hardmode Anvil & Adamantite Bar; Forbidden Armor; ArmorMinions(2); Hardmode Anvil & Adamantite Bar & Forbidden Fragment; Aquatic Scourge; Calamity | Location | Item; diff --git a/worlds/terraria/__init__.py b/worlds/terraria/__init__.py index 306a65ef9186..6ef281157f9d 100644 --- a/worlds/terraria/__init__.py +++ b/worlds/terraria/__init__.py @@ -240,6 +240,8 @@ def check_condition( return not sign elif condition == "calamity": return sign == self.calamity + elif condition == "grindy": + return sign == (self.multiworld.achievements[self.player].value >= 2) elif condition == "pickaxe": if type(arg) is not int: raise Exception("@pickaxe requires an integer argument") From 9ef1fa825dbb71f4186034f277386299a0f52fc1 Mon Sep 17 00:00:00 2001 From: NewSoupVi <57900059+NewSoupVi@users.noreply.github.com> Date: Sun, 14 Apr 2024 02:21:18 +0200 Subject: [PATCH 035/153] The Witness: Rename "Town Windmill Entry" to "Windmill Entry" (#3081) --- worlds/witness/data/WitnessItems.txt | 4 ++-- .../data/settings/Door_Shuffle/Complex_Door_Panels.txt | 2 +- worlds/witness/data/settings/Door_Shuffle/Complex_Doors.txt | 2 +- 3 files changed, 4 insertions(+), 4 deletions(-) diff --git a/worlds/witness/data/WitnessItems.txt b/worlds/witness/data/WitnessItems.txt index 28dc4a4d9784..86567f29e2e8 100644 --- a/worlds/witness/data/WitnessItems.txt +++ b/worlds/witness/data/WitnessItems.txt @@ -72,7 +72,7 @@ Doors: 1164 - Town RGB Control (Panel) - 0x334D8 1166 - Town Maze Stairs (Panel) - 0x28A79 1167 - Town Maze Rooftop Bridge (Panel) - 0x2896A -1169 - Town Windmill Entry (Panel) - 0x17F5F +1169 - Windmill Entry (Panel) - 0x17F5F 1172 - Town Cargo Box Entry (Panel) - 0x0A0C8 1173 - Town Desert Laser Redirect Control (Panel) - 0x09F98 1182 - Windmill Turn Control (Panel) - 0x17D02 @@ -159,7 +159,7 @@ Doors: 1723 - Town RGB House Entry (Door) - 0x28A61 1726 - Town Church Entry (Door) - 0x03BB0 1729 - Town Maze Stairs (Door) - 0x28AA2 -1732 - Town Windmill Entry (Door) - 0x1845B +1732 - Windmill Entry (Door) - 0x1845B 1735 - Town RGB House Stairs (Door) - 0x2897B 1738 - Town Tower Second (Door) - 0x27798 1741 - Town Tower First (Door) - 0x27799 diff --git a/worlds/witness/data/settings/Door_Shuffle/Complex_Door_Panels.txt b/worlds/witness/data/settings/Door_Shuffle/Complex_Door_Panels.txt index 70223bd74924..63d8a58d2676 100644 --- a/worlds/witness/data/settings/Door_Shuffle/Complex_Door_Panels.txt +++ b/worlds/witness/data/settings/Door_Shuffle/Complex_Door_Panels.txt @@ -19,7 +19,7 @@ Monastery Entry Right (Panel) Town RGB House Entry (Panel) Town Church Entry (Panel) Town Maze Stairs (Panel) -Town Windmill Entry (Panel) +Windmill Entry (Panel) Town Cargo Box Entry (Panel) Theater Entry (Panel) Theater Exit (Panel) diff --git a/worlds/witness/data/settings/Door_Shuffle/Complex_Doors.txt b/worlds/witness/data/settings/Door_Shuffle/Complex_Doors.txt index 87ec69f59c81..7c81fd3472b4 100644 --- a/worlds/witness/data/settings/Door_Shuffle/Complex_Doors.txt +++ b/worlds/witness/data/settings/Door_Shuffle/Complex_Doors.txt @@ -49,7 +49,7 @@ Town Wooden Roof Stairs (Door) Town RGB House Entry (Door) Town Church Entry (Door) Town Maze Stairs (Door) -Town Windmill Entry (Door) +Windmill Entry (Door) Town RGB House Stairs (Door) Town Tower Second (Door) Town Tower First (Door) From 5bda265f433385665f16256ed1a085ed9c322dd8 Mon Sep 17 00:00:00 2001 From: PinkSwitch <52474902+PinkSwitch@users.noreply.github.com> Date: Sat, 13 Apr 2024 19:23:59 -0500 Subject: [PATCH 036/153] Yoshi's Island: Fix Outdated Connection Setup (#3113) --- worlds/yoshisisland/docs/setup_en.md | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/worlds/yoshisisland/docs/setup_en.md b/worlds/yoshisisland/docs/setup_en.md index 4c8ffad7044c..d76144608914 100644 --- a/worlds/yoshisisland/docs/setup_en.md +++ b/worlds/yoshisisland/docs/setup_en.md @@ -72,8 +72,7 @@ first time launching, you may be prompted to allow it to communicate through the 3. Click on **New Lua Script Window...** 4. In the new window, click **Browse...** 5. Select the connector lua file included with your client - - Look in the Archipelago folder for `/SNI/lua/x64` or `/SNI/lua/x86` depending on if the - emulator is 64-bit or 32-bit. + - Look in the Archipelago folder for `/SNI/lua/Connector.lua`. 6. If you see an error while loading the script that states `socket.dll missing` or similar, navigate to the folder of the lua you are using in your file explorer and copy the `socket.dll` to the base folder of your snes9x install. From 98e2d89a1c98c1c4d3f4c53f66511e5cdd2ce366 Mon Sep 17 00:00:00 2001 From: Aaron Wagener Date: Sat, 13 Apr 2024 19:25:27 -0500 Subject: [PATCH 037/153] Core: Let location name groups work with /hint_location (#2814) --- MultiServer.py | 9 +++++++-- 1 file changed, 7 insertions(+), 2 deletions(-) diff --git a/MultiServer.py b/MultiServer.py index b70f2deae624..f12e96c8fbf4 100644 --- a/MultiServer.py +++ b/MultiServer.py @@ -2090,8 +2090,8 @@ def _cmd_hint_location(self, player_name: str, *location_name: str) -> bool: if full_name.isnumeric(): location, usable, response = int(full_name), True, None - elif self.ctx.location_names_for_game(game) is not None: - location, usable, response = get_intended_text(full_name, self.ctx.location_names_for_game(game)) + elif game in self.ctx.all_location_and_group_names: + location, usable, response = get_intended_text(full_name, self.ctx.all_location_and_group_names[game]) else: self.output("Can't look up location for unknown game. Hint for ID instead.") return False @@ -2099,6 +2099,11 @@ 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) + 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)) else: hints = collect_hint_location_name(self.ctx, team, slot, location) if hints: From ca5c0d9eb8bee6ab9da10e0c14b3ff52d707c4b3 Mon Sep 17 00:00:00 2001 From: zig-for Date: Sat, 13 Apr 2024 18:21:55 -0700 Subject: [PATCH 038/153] LADX: Add "boots controls" option (#2085) --- worlds/ladx/LADXR/assembler.py | 2 +- worlds/ladx/LADXR/generator.py | 7 +- worlds/ladx/LADXR/locations/startItem.py | 1 - .../ladx/LADXR/patches/bank3e.asm/chest.asm | 9 +- worlds/ladx/LADXR/patches/core.py | 102 +++++++++++++++++- worlds/ladx/Options.py | 17 ++- 6 files changed, 127 insertions(+), 11 deletions(-) diff --git a/worlds/ladx/LADXR/assembler.py b/worlds/ladx/LADXR/assembler.py index 6c35fac4b3a8..c95d4dd9912c 100644 --- a/worlds/ladx/LADXR/assembler.py +++ b/worlds/ladx/LADXR/assembler.py @@ -757,7 +757,7 @@ def getLabels(self) -> ItemsView[str, int]: def const(name: str, value: int) -> None: name = name.upper() - assert name not in CONST_MAP + assert name not in CONST_MAP or CONST_MAP[name] == value CONST_MAP[name] = value diff --git a/worlds/ladx/LADXR/generator.py b/worlds/ladx/LADXR/generator.py index 0406ad51f890..e87459fb1115 100644 --- a/worlds/ladx/LADXR/generator.py +++ b/worlds/ladx/LADXR/generator.py @@ -65,7 +65,7 @@ from BaseClasses import ItemClassification from ..Locations import LinksAwakeningLocation -from ..Options import TrendyGame, Palette, MusicChangeCondition +from ..Options import TrendyGame, Palette, MusicChangeCondition, BootsControls # Function to generate a final rom, this patches the rom with all required patches @@ -97,7 +97,7 @@ def generateRom(args, settings, ap_settings, auth, seed_name, logic, rnd=None, m assembler.const("wTradeSequenceItem2", 0xDB7F) # Normally used to store that we have exchanged the trade item, we use it to store flags of which trade items we have assembler.const("wSeashellsCount", 0xDB41) assembler.const("wGoldenLeaves", 0xDB42) # New memory location where to store the golden leaf counter - assembler.const("wCollectedTunics", 0xDB6D) # Memory location where to store which tunic options are available + assembler.const("wCollectedTunics", 0xDB6D) # Memory location where to store which tunic options are available (and boots) assembler.const("wCustomMessage", 0xC0A0) # We store the link info in unused color dungeon flags, so it gets preserved in the savegame. @@ -243,6 +243,9 @@ def generateRom(args, settings, ap_settings, auth, seed_name, logic, rnd=None, m patches.core.quickswap(rom, 1) elif settings.quickswap == 'b': patches.core.quickswap(rom, 0) + + patches.core.addBootsControls(rom, ap_settings['boots_controls']) + world_setup = logic.world_setup diff --git a/worlds/ladx/LADXR/locations/startItem.py b/worlds/ladx/LADXR/locations/startItem.py index 95dd6ba54abd..0421c1d6d865 100644 --- a/worlds/ladx/LADXR/locations/startItem.py +++ b/worlds/ladx/LADXR/locations/startItem.py @@ -10,7 +10,6 @@ class StartItem(DroppedKey): # We need to give something here that we can use to progress. # FEATHER OPTIONS = [SWORD, SHIELD, POWER_BRACELET, OCARINA, BOOMERANG, MAGIC_ROD, TAIL_KEY, SHOVEL, HOOKSHOT, PEGASUS_BOOTS, MAGIC_POWDER, BOMB] - MULTIWORLD = False def __init__(self): diff --git a/worlds/ladx/LADXR/patches/bank3e.asm/chest.asm b/worlds/ladx/LADXR/patches/bank3e.asm/chest.asm index b19e879dc30e..57771c17b3ca 100644 --- a/worlds/ladx/LADXR/patches/bank3e.asm/chest.asm +++ b/worlds/ladx/LADXR/patches/bank3e.asm/chest.asm @@ -51,7 +51,7 @@ GiveItemFromChest: dw ChestBow ; CHEST_BOW dw ChestWithItem ; CHEST_HOOKSHOT dw ChestWithItem ; CHEST_MAGIC_ROD - dw ChestWithItem ; CHEST_PEGASUS_BOOTS + dw Boots ; CHEST_PEGASUS_BOOTS dw ChestWithItem ; CHEST_OCARINA dw ChestWithItem ; CHEST_FEATHER dw ChestWithItem ; CHEST_SHOVEL @@ -273,6 +273,13 @@ ChestMagicPowder: ld [$DB4C], a jp ChestWithItem +Boots: + ; We use DB6D to store which tunics we have available + ; ...and the boots + ld a, [wCollectedTunics] + or $04 + ld [wCollectedTunics], a + jp ChestWithItem Flippers: ld a, $01 diff --git a/worlds/ladx/LADXR/patches/core.py b/worlds/ladx/LADXR/patches/core.py index c9f3a7c34b60..f4752c82e3da 100644 --- a/worlds/ladx/LADXR/patches/core.py +++ b/worlds/ladx/LADXR/patches/core.py @@ -1,9 +1,11 @@ +from .. import assembler from ..assembler import ASM from ..entranceInfo import ENTRANCE_INFO from ..roomEditor import RoomEditor, ObjectWarp, ObjectHorizontal from ..backgroundEditor import BackgroundEditor from .. import utils +from ...Options import BootsControls def bugfixWrittingWrongRoomStatus(rom): # The normal rom contains a pretty nasty bug where door closing triggers in D7/D8 can effect doors in @@ -391,7 +393,7 @@ def addFrameCounter(rom, check_count): db $20, $20, $20, $00 ;I db $20, $28, $28, $00 ;M db $20, $30, $18, $00 ;E - + db $20, $70, $16, $00 ;D db $20, $78, $18, $00 ;E db $20, $80, $10, $00 ;A @@ -408,7 +410,7 @@ def addFrameCounter(rom, check_count): db $68, $38, $%02x, $00 ;0 db $68, $40, $%02x, $00 ;0 db $68, $48, $%02x, $00 ;0 - + """ % ((((check_count // 100) % 10) * 2) | 0x40, (((check_count // 10) % 10) * 2) | 0x40, ((check_count % 10) * 2) | 0x40), 0x469D), fill_nop=True) # Lower line of credits roll into XX XX XX rom.patch(0x17, 0x0784, 0x082D, ASM(""" @@ -425,7 +427,7 @@ def addFrameCounter(rom, check_count): call updateOAM ld a, [$B001] ; seconds call updateOAM - + ld a, [$DB58] ; death count high call updateOAM ld a, [$DB57] ; death count low @@ -473,7 +475,7 @@ def addFrameCounter(rom, check_count): db $68, $18, $40, $00 ;0 db $68, $20, $40, $00 ;0 db $68, $28, $40, $00 ;0 - + """, 0x4784), fill_nop=True) # Grab the "mostly" complete A-Z font @@ -539,6 +541,97 @@ def addFrameCounter(rom, check_count): rom.banks[0x38][0x1400+n*0x20:0x1410+n*0x20] = utils.createTileData(gfx_high) rom.banks[0x38][0x1410+n*0x20:0x1420+n*0x20] = utils.createTileData(gfx_low) +def addBootsControls(rom, boots_controls: BootsControls): + if boots_controls == BootsControls.option_vanilla: + return + consts = { + "INVENTORY_PEGASUS_BOOTS": 0x8, + "INVENTORY_POWER_BRACELET": 0x3, + "UsePegasusBoots": 0x1705, + "J_A": (1 << 4), + "J_B": (1 << 5), + "wAButtonSlot": 0xDB01, + "wBButtonSlot": 0xDB00, + "wPegasusBootsChargeMeter": 0xC14B, + "hPressedButtonsMask": 0xCB + } + for c,v in consts.items(): + assembler.const(c, v) + + BOOTS_START_ADDR = 0x11E8 + condition = { + BootsControls.option_bracelet: """ + ld a, [hl] + ; Check if we are using the bracelet + cp INVENTORY_POWER_BRACELET + jr z, .yesBoots + """, + BootsControls.option_press_a: """ + ; Check if we are using the A slot + cp J_A + jr z, .yesBoots + ld a, [hl] + """, + BootsControls.option_press_b: """ + ; Check if we are using the B slot + cp J_B + jr z, .yesBoots + ld a, [hl] + """ + }[boots_controls.value] + + # The new code fits exactly within Nintendo's poorly space optimzied code while having more features + boots_code = assembler.ASM(""" +CheckBoots: + ; check if we own boots + ld a, [wCollectedTunics] + and $04 + ; if not, move on to the next inventory item (shield) + jr z, .out + + ; Check the B button + ld hl, wBButtonSlot + ld d, J_B + call .maybeBoots + + ; Check the A button + inc l ; l = wAButtonSlot - done this way to save a byte or two + ld d, J_A + call .maybeBoots + + ; If neither, reset charge meter and bail + xor a + ld [wPegasusBootsChargeMeter], a + jr .out + +.maybeBoots: + ; Check if we are holding this button even + ldh a, [hPressedButtonsMask] + and d + ret z + """ + # Check the special condition (also loads the current item for button into a) + + condition + + """ + ; Check if we are just using boots regularly + cp INVENTORY_PEGASUS_BOOTS + ret nz +.yesBoots: + ; We're using boots! Do so. + call UsePegasusBoots + ; If we return now we will go back into CheckBoots, we don't want that + ; We instead want to move onto the next item + ; but if we don't cleanup, the next "ret" will take us back there again + ; So we pop the return address off of the stack + pop af +.out: + """, BOOTS_START_ADDR) + + + + original_code = 'fa00dbfe08200ff0cbe6202805cd05171804afea4bc1fa01dbfe08200ff0cbe6102805cd05171804afea4bc1' + rom.patch(0, BOOTS_START_ADDR, original_code, boots_code, fill_nop=True) + def addWarpImprovements(rom, extra_warps): # Patch in a warp icon tile = utils.createTileData( \ @@ -739,4 +832,3 @@ def addWarpImprovements(rom, extra_warps): exit: ret """)) - diff --git a/worlds/ladx/Options.py b/worlds/ladx/Options.py index ec4570640788..f7bf632545f7 100644 --- a/worlds/ladx/Options.py +++ b/worlds/ladx/Options.py @@ -316,6 +316,21 @@ class Overworld(Choice, LADXROption): # [Disable] no music in the whole game""", # aesthetic=True), +class BootsControls(Choice): + """ + Adds additional button to activate Pegasus Boots (does nothing if you haven't picked up your boots!) + [Vanilla] Nothing changes, you have to equip the boots to use them + [Bracelet] Holding down the button for the bracelet also activates boots (somewhat like Link to the Past) + [Press A] Holding down A activates boots + [Press B] Holding down B activates boots + """ + display_name = "Boots Controls" + option_vanilla = 0 + option_bracelet = 1 + option_press_a = 2 + option_press_b = 3 + + class LinkPalette(Choice, LADXROption): """ Sets link's palette @@ -485,5 +500,5 @@ class AdditionalWarpPoints(DefaultOffToggle): 'music_change_condition': MusicChangeCondition, 'nag_messages': NagMessages, 'ap_title_screen': APTitleScreen, - + 'boots_controls': BootsControls, } From 50fb70d832255d7d55502253d8ae692275a887ee Mon Sep 17 00:00:00 2001 From: Bryce Wilson Date: Sat, 13 Apr 2024 19:26:25 -0600 Subject: [PATCH 039/153] BizHawkClient: Add error message if patching fails (#2877) --- worlds/_bizhawk/context.py | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/worlds/_bizhawk/context.py b/worlds/_bizhawk/context.py index 85e2c9909738..05bee23412d5 100644 --- a/worlds/_bizhawk/context.py +++ b/worlds/_bizhawk/context.py @@ -234,8 +234,11 @@ async def _run_game(rom: str): async def _patch_and_run_game(patch_file: str): - metadata, output_file = Patch.create_rom_file(patch_file) - Utils.async_start(_run_game(output_file)) + try: + metadata, output_file = Patch.create_rom_file(patch_file) + Utils.async_start(_run_game(output_file)) + except Exception as exc: + logger.exception(exc) def launch() -> None: From d4ec4d32f071966b727695162229e480647475a8 Mon Sep 17 00:00:00 2001 From: Alchav <59858495+Alchav@users.noreply.github.com> Date: Sun, 14 Apr 2024 11:30:40 -0400 Subject: [PATCH 040/153] ALTTP: Bomb Walls Logic Fixes (#3130) --- BaseClasses.py | 8 -------- worlds/alttp/EntranceShuffle.py | 8 ++++++++ worlds/alttp/InvertedRegions.py | 8 +++++--- worlds/alttp/Regions.py | 6 ++++-- worlds/alttp/Rom.py | 12 ++++++------ worlds/alttp/Rules.py | 11 ++++++++++- worlds/alttp/__init__.py | 13 +++++++++++++ worlds/alttp/test/inverted_owg/TestDeathMountain.py | 8 ++++---- worlds/alttp/test/owg/TestDeathMountain.py | 8 ++++---- 9 files changed, 54 insertions(+), 28 deletions(-) diff --git a/BaseClasses.py b/BaseClasses.py index a928f034b7f1..b03d24e5ce89 100644 --- a/BaseClasses.py +++ b/BaseClasses.py @@ -160,14 +160,6 @@ def __init__(self, players: int): self.local_early_items = {player: {} for player in self.player_ids} self.indirect_connections = {} self.start_inventory_from_pool: Dict[int, Options.StartInventoryPool] = {} - self.fix_trock_doors = self.AttributeProxy( - lambda player: self.shuffle[player] != 'vanilla' or self.mode[player] == 'inverted') - self.fix_skullwoods_exit = self.AttributeProxy( - lambda player: self.shuffle[player] not in ['vanilla', 'simple', 'restricted', 'dungeons_simple']) - self.fix_palaceofdarkness_exit = self.AttributeProxy( - lambda player: self.shuffle[player] not in ['vanilla', 'simple', 'restricted', 'dungeons_simple']) - self.fix_trock_exit = self.AttributeProxy( - lambda player: self.shuffle[player] not in ['vanilla', 'simple', 'restricted', 'dungeons_simple']) for player in range(1, players + 1): def set_player_attr(attr, val): diff --git a/worlds/alttp/EntranceShuffle.py b/worlds/alttp/EntranceShuffle.py index 988455ba3ce8..062f0588f623 100644 --- a/worlds/alttp/EntranceShuffle.py +++ b/worlds/alttp/EntranceShuffle.py @@ -2657,6 +2657,10 @@ def plando_connect(world, player: int): ('Turtle Rock (Dark Room) (North)', 'Turtle Rock (Crystaroller Room)'), ('Turtle Rock (Dark Room) (South)', 'Turtle Rock (Eye Bridge)'), ('Turtle Rock Dark Room (South)', 'Turtle Rock (Dark Room)'), + ('Turtle Rock Second Section Bomb Wall', 'Turtle Rock (Second Section Bomb Wall)'), + ('Turtle Rock Second Section from Bomb Wall', 'Turtle Rock (Second Section)'), + ('Turtle Rock Eye Bridge Bomb Wall', 'Turtle Rock (Eye Bridge Bomb Wall)'), + ('Turtle Rock Eye Bridge from Bomb Wall', 'Turtle Rock (Eye Bridge)'), ('Turtle Rock (Trinexx)', 'Turtle Rock (Trinexx)'), ('Palace of Darkness Bridge Room', 'Palace of Darkness (Center)'), ('Palace of Darkness Bonk Wall', 'Palace of Darkness (Bonk Section)'), @@ -2815,6 +2819,10 @@ def plando_connect(world, player: int): ('Turtle Rock (Dark Room) (North)', 'Turtle Rock (Crystaroller Room)'), ('Turtle Rock (Dark Room) (South)', 'Turtle Rock (Eye Bridge)'), ('Turtle Rock Dark Room (South)', 'Turtle Rock (Dark Room)'), + ('Turtle Rock Second Section Bomb Wall', 'Turtle Rock (Second Section Bomb Wall)'), + ('Turtle Rock Second Section from Bomb Wall', 'Turtle Rock (Second Section)'), + ('Turtle Rock Eye Bridge Bomb Wall', 'Turtle Rock (Eye Bridge Bomb Wall)'), + ('Turtle Rock Eye Bridge from Bomb Wall', 'Turtle Rock (Eye Bridge)'), ('Turtle Rock (Trinexx)', 'Turtle Rock (Trinexx)'), ('Palace of Darkness Bridge Room', 'Palace of Darkness (Center)'), ('Palace of Darkness Bonk Wall', 'Palace of Darkness (Bonk Section)'), diff --git a/worlds/alttp/InvertedRegions.py b/worlds/alttp/InvertedRegions.py index 25d4314769f2..63a2d499e2d4 100644 --- a/worlds/alttp/InvertedRegions.py +++ b/worlds/alttp/InvertedRegions.py @@ -408,14 +408,16 @@ def create_inverted_regions(world, player): ['Turtle Rock (Chain Chomp Room) (North)', 'Turtle Rock (Chain Chomp Room) (South)']), create_dungeon_region(world, player, 'Turtle Rock (Second Section)', 'Turtle Rock', ['Turtle Rock - Big Key Chest', 'Turtle Rock - Pokey 2 Key Drop'], - ['Turtle Rock Ledge Exit (West)', 'Turtle Rock Chain Chomp Staircase', - 'Turtle Rock Big Key Door']), + ['Turtle Rock Chain Chomp Staircase', 'Turtle Rock Big Key Door', + 'Turtle Rock Second Section Bomb Wall']), + create_dungeon_region(world, player, 'Turtle Rock (Second Section Bomb Wall)', 'Turtle Rock', None, ['Turtle Rock Ledge Exit (West)', 'Turtle Rock Second Section from Bomb Wall']), create_dungeon_region(world, player, 'Turtle Rock (Big Chest)', 'Turtle Rock', ['Turtle Rock - Big Chest'], ['Turtle Rock (Big Chest) (North)', 'Turtle Rock Ledge Exit (East)']), create_dungeon_region(world, player, 'Turtle Rock (Crystaroller Room)', 'Turtle Rock', ['Turtle Rock - Crystaroller Room'], ['Turtle Rock Dark Room Staircase', 'Turtle Rock Big Key Door Reverse']), create_dungeon_region(world, player, 'Turtle Rock (Dark Room)', 'Turtle Rock', None, ['Turtle Rock (Dark Room) (North)', 'Turtle Rock (Dark Room) (South)']), + create_dungeon_region(world, player, 'Turtle Rock (Eye Bridge Bomb Wall)', 'Turtle Rock', None, ['Turtle Rock Isolated Ledge Exit', 'Turtle Rock Eye Bridge from Bomb Wall']), create_dungeon_region(world, player, 'Turtle Rock (Eye Bridge)', 'Turtle Rock', ['Turtle Rock - Eye Bridge - Bottom Left', 'Turtle Rock - Eye Bridge - Bottom Right', 'Turtle Rock - Eye Bridge - Top Left', 'Turtle Rock - Eye Bridge - Top Right'], - ['Turtle Rock Dark Room (South)', 'Turtle Rock (Trinexx)', 'Turtle Rock Isolated Ledge Exit']), + ['Turtle Rock Dark Room (South)', 'Turtle Rock (Trinexx)', 'Turtle Rock Eye Bridge Bomb Wall']), create_dungeon_region(world, player, 'Turtle Rock (Trinexx)', 'Turtle Rock', ['Turtle Rock - Boss', 'Turtle Rock - Prize']), create_dungeon_region(world, player, 'Palace of Darkness (Entrance)', 'Palace of Darkness', ['Palace of Darkness - Shooter Room'], ['Palace of Darkness Bridge Room', 'Palace of Darkness Bonk Wall', 'Palace of Darkness Exit']), create_dungeon_region(world, player, 'Palace of Darkness (Center)', 'Palace of Darkness', ['Palace of Darkness - The Arena - Bridge', 'Palace of Darkness - Stalfos Basement'], diff --git a/worlds/alttp/Regions.py b/worlds/alttp/Regions.py index dc3adb108af1..4c2e7d509e9a 100644 --- a/worlds/alttp/Regions.py +++ b/worlds/alttp/Regions.py @@ -336,13 +336,15 @@ def create_regions(world, player): ['Turtle Rock Entrance to Pokey Room', 'Turtle Rock Entrance Gap Reverse']), create_dungeon_region(world, player, 'Turtle Rock (Pokey Room)', 'Turtle Rock', ['Turtle Rock - Pokey 1 Key Drop'], ['Turtle Rock (Pokey Room) (North)', 'Turtle Rock (Pokey Room) (South)']), create_dungeon_region(world, player, 'Turtle Rock (Chain Chomp Room)', 'Turtle Rock', ['Turtle Rock - Chain Chomps'], ['Turtle Rock (Chain Chomp Room) (North)', 'Turtle Rock (Chain Chomp Room) (South)']), - create_dungeon_region(world, player, 'Turtle Rock (Second Section)', 'Turtle Rock', ['Turtle Rock - Big Key Chest', 'Turtle Rock - Pokey 2 Key Drop'], ['Turtle Rock Ledge Exit (West)', 'Turtle Rock Chain Chomp Staircase', 'Turtle Rock Big Key Door']), + create_dungeon_region(world, player, 'Turtle Rock (Second Section)', 'Turtle Rock', ['Turtle Rock - Big Key Chest', 'Turtle Rock - Pokey 2 Key Drop'], ['Turtle Rock Chain Chomp Staircase', 'Turtle Rock Big Key Door', 'Turtle Rock Second Section Bomb Wall']), + create_dungeon_region(world, player, 'Turtle Rock (Second Section Bomb Wall)', 'Turtle Rock', None, ['Turtle Rock Ledge Exit (West)', 'Turtle Rock Second Section from Bomb Wall']), create_dungeon_region(world, player, 'Turtle Rock (Big Chest)', 'Turtle Rock', ['Turtle Rock - Big Chest'], ['Turtle Rock (Big Chest) (North)', 'Turtle Rock Ledge Exit (East)']), create_dungeon_region(world, player, 'Turtle Rock (Crystaroller Room)', 'Turtle Rock', ['Turtle Rock - Crystaroller Room'], ['Turtle Rock Dark Room Staircase', 'Turtle Rock Big Key Door Reverse']), create_dungeon_region(world, player, 'Turtle Rock (Dark Room)', 'Turtle Rock', None, ['Turtle Rock (Dark Room) (North)', 'Turtle Rock (Dark Room) (South)']), + create_dungeon_region(world, player, 'Turtle Rock (Eye Bridge Bomb Wall)', 'Turtle Rock', None, ['Turtle Rock Isolated Ledge Exit', 'Turtle Rock Eye Bridge from Bomb Wall']), create_dungeon_region(world, player, 'Turtle Rock (Eye Bridge)', 'Turtle Rock', ['Turtle Rock - Eye Bridge - Bottom Left', 'Turtle Rock - Eye Bridge - Bottom Right', 'Turtle Rock - Eye Bridge - Top Left', 'Turtle Rock - Eye Bridge - Top Right'], - ['Turtle Rock Dark Room (South)', 'Turtle Rock (Trinexx)', 'Turtle Rock Isolated Ledge Exit']), + ['Turtle Rock Dark Room (South)', 'Turtle Rock (Trinexx)', 'Turtle Rock Eye Bridge Bomb Wall']), create_dungeon_region(world, player, 'Turtle Rock (Trinexx)', 'Turtle Rock', ['Turtle Rock - Boss', 'Turtle Rock - Prize']), create_dungeon_region(world, player, 'Palace of Darkness (Entrance)', 'Palace of Darkness', ['Palace of Darkness - Shooter Room'], ['Palace of Darkness Bridge Room', 'Palace of Darkness Bonk Wall', 'Palace of Darkness Exit']), create_dungeon_region(world, player, 'Palace of Darkness (Center)', 'Palace of Darkness', ['Palace of Darkness - The Arena - Bridge', 'Palace of Darkness - Stalfos Basement'], diff --git a/worlds/alttp/Rom.py b/worlds/alttp/Rom.py index 747f61498e6d..274aceba57dc 100644 --- a/worlds/alttp/Rom.py +++ b/worlds/alttp/Rom.py @@ -868,11 +868,11 @@ def patch_rom(world: MultiWorld, rom: LocalRom, player: int, enemized: bool): exit.name not in {'Palace of Darkness Exit', 'Tower of Hera Exit', 'Swamp Palace Exit'}): # For exits that connot be reached from another, no need to apply offset fixes. rom.write_int16(0x15DB5 + 2 * offset, link_y) # same as final else - elif room_id == 0x0059 and world.fix_skullwoods_exit[player]: + elif room_id == 0x0059 and local_world.fix_skullwoods_exit: rom.write_int16(0x15DB5 + 2 * offset, 0x00F8) - elif room_id == 0x004a and world.fix_palaceofdarkness_exit[player]: + elif room_id == 0x004a and local_world.fix_palaceofdarkness_exit: rom.write_int16(0x15DB5 + 2 * offset, 0x0640) - elif room_id == 0x00d6 and world.fix_trock_exit[player]: + elif room_id == 0x00d6 and local_world.fix_trock_exit: rom.write_int16(0x15DB5 + 2 * offset, 0x0134) elif room_id == 0x000c and world.shuffle_ganon: # fix ganons tower exit point rom.write_int16(0x15DB5 + 2 * offset, 0x00A4) @@ -1674,14 +1674,14 @@ def get_reveal_bytes(itemName): rom.write_byte(0x4E3BB, 0xEB) # fix trock doors for reverse entrances - if world.fix_trock_doors[player]: + if local_world.fix_trock_doors: rom.write_byte(0xFED31, 0x0E) # preopen bombable exit rom.write_byte(0xFEE41, 0x0E) # preopen bombable exit # included unconditionally in base2current # rom.write_byte(0xFE465, 0x1E) # remove small key door on backside of big key door else: - rom.write_byte(0xFED31, 0x2A) # preopen bombable exit - rom.write_byte(0xFEE41, 0x2A) # preopen bombable exit + rom.write_byte(0xFED31, 0x2A) # bombable exit + rom.write_byte(0xFEE41, 0x2A) # bombable exit if world.tile_shuffle[player]: tile_set = TileSet.get_random_tile_set(world.per_slot_randoms[player]) diff --git a/worlds/alttp/Rules.py b/worlds/alttp/Rules.py index 320f9fe6fd6e..7ff3c757bd78 100644 --- a/worlds/alttp/Rules.py +++ b/worlds/alttp/Rules.py @@ -279,6 +279,9 @@ def global_rules(world, player): (state.multiworld.can_take_damage[player] and (state.has('Pegasus Boots', player) or has_hearts(state, player, 4)))))) ) + set_rule(world.get_entrance('Hookshot Cave Bomb Wall (North)', player), lambda state: can_use_bombs(state, player)) + set_rule(world.get_entrance('Hookshot Cave Bomb Wall (South)', player), lambda state: can_use_bombs(state, player)) + set_rule(world.get_location('Hookshot Cave - Top Right', player), lambda state: state.has('Hookshot', player)) set_rule(world.get_location('Hookshot Cave - Top Left', player), lambda state: state.has('Hookshot', player)) set_rule(world.get_location('Hookshot Cave - Bottom Right', player), @@ -477,7 +480,6 @@ def global_rules(world, player): set_rule(world.get_location('Turtle Rock - Big Chest', player), lambda state: state.has('Big Key (Turtle Rock)', player) and (state.has('Cane of Somaria', player) or state.has('Hookshot', player))) set_rule(world.get_entrance('Turtle Rock (Big Chest) (North)', player), lambda state: state.has('Cane of Somaria', player) or state.has('Hookshot', player)) set_rule(world.get_entrance('Turtle Rock Big Key Door', player), lambda state: state.has('Big Key (Turtle Rock)', player) and can_kill_most_things(state, player, 10)) - set_rule(world.get_entrance('Turtle Rock Ledge Exit (West)', player), lambda state: can_use_bombs(state, player) and can_kill_most_things(state, player, 10)) set_rule(world.get_location('Turtle Rock - Chain Chomps', player), lambda state: can_use_bombs(state, player) or can_shoot_arrows(state, player) or has_beam_sword(state, player) or state.has_any(["Blue Boomerang", "Red Boomerang", "Hookshot", "Cane of Somaria", "Fire Rod", "Ice Rod"], player)) set_rule(world.get_entrance('Turtle Rock (Dark Room) (North)', player), lambda state: state.has('Cane of Somaria', player)) @@ -487,6 +489,13 @@ def global_rules(world, player): set_rule(world.get_location('Turtle Rock - Eye Bridge - Top Left', player), lambda state: state.has('Cane of Byrna', player) or state.has('Cape', player) or state.has('Mirror Shield', player)) set_rule(world.get_location('Turtle Rock - Eye Bridge - Top Right', player), lambda state: state.has('Cane of Byrna', player) or state.has('Cape', player) or state.has('Mirror Shield', player)) set_rule(world.get_entrance('Turtle Rock (Trinexx)', player), lambda state: state._lttp_has_key('Small Key (Turtle Rock)', player, 6) and state.has('Big Key (Turtle Rock)', player) and state.has('Cane of Somaria', player)) + set_rule(world.get_entrance('Turtle Rock Second Section Bomb Wall', player), lambda state: can_kill_most_things(state, player, 10)) + + if not world.worlds[player].fix_trock_doors: + add_rule(world.get_entrance('Turtle Rock Second Section Bomb Wall', player), lambda state: can_use_bombs(state, player)) + set_rule(world.get_entrance('Turtle Rock Second Section from Bomb Wall', player), lambda state: can_use_bombs(state, player)) + set_rule(world.get_entrance('Turtle Rock Eye Bridge from Bomb Wall', player), lambda state: can_use_bombs(state, player)) + set_rule(world.get_entrance('Turtle Rock Eye Bridge Bomb Wall', player), lambda state: can_use_bombs(state, player)) if world.enemy_shuffle[player]: set_rule(world.get_entrance('Palace of Darkness Bonk Wall', player), lambda state: can_bomb_or_bonk(state, player) and can_kill_most_things(state, player, 3)) diff --git a/worlds/alttp/__init__.py b/worlds/alttp/__init__.py index 8baeeb6dc278..9abc15b75bc9 100644 --- a/worlds/alttp/__init__.py +++ b/worlds/alttp/__init__.py @@ -261,6 +261,10 @@ def __init__(self, *args, **kwargs): self.dungeons = {} self.waterfall_fairy_bottle_fill = "Bottle" self.pyramid_fairy_bottle_fill = "Bottle" + self.fix_trock_doors = None + self.fix_skullwoods_exit = None + self.fix_palaceofdarkness_exit = None + self.fix_trock_exit = None super(ALTTPWorld, self).__init__(*args, **kwargs) @classmethod @@ -280,6 +284,15 @@ def generate_early(self): player = self.player multiworld = self.multiworld + self.fix_trock_doors = (multiworld.entrance_shuffle[player] != 'vanilla' + or multiworld.mode[player] == 'inverted') + self.fix_skullwoods_exit = multiworld.entrance_shuffle[player] not in ['vanilla', 'simple', 'restricted', + 'dungeons_simple'] + self.fix_palaceofdarkness_exit = multiworld.entrance_shuffle[player] not in ['dungeons_simple', 'vanilla', + 'simple', 'restricted'] + self.fix_trock_exit = multiworld.entrance_shuffle[player] not in ['vanilla', 'simple', 'restricted', + 'dungeons_simple'] + # fairy bottle fills bottle_options = [ "Bottle (Red Potion)", "Bottle (Green Potion)", "Bottle (Blue Potion)", diff --git a/worlds/alttp/test/inverted_owg/TestDeathMountain.py b/worlds/alttp/test/inverted_owg/TestDeathMountain.py index b509643d0c5e..5186ae9106df 100644 --- a/worlds/alttp/test/inverted_owg/TestDeathMountain.py +++ b/worlds/alttp/test/inverted_owg/TestDeathMountain.py @@ -101,20 +101,20 @@ def testEastDarkWorldDeathMountain(self): ["Hookshot Cave - Bottom Right", False, []], ["Hookshot Cave - Bottom Right", False, [], ['Hookshot', 'Pegasus Boots']], ["Hookshot Cave - Bottom Right", False, [], ['Progressive Glove', 'Pegasus Boots', 'Magic Mirror']], - ["Hookshot Cave - Bottom Right", True, ['Pegasus Boots']], + ["Hookshot Cave - Bottom Right", True, ['Pegasus Boots', 'Bomb Upgrade (50)']], ["Hookshot Cave - Bottom Left", False, []], ["Hookshot Cave - Bottom Left", False, [], ['Hookshot']], ["Hookshot Cave - Bottom Left", False, [], ['Progressive Glove', 'Pegasus Boots', 'Magic Mirror']], - ["Hookshot Cave - Bottom Left", True, ['Pegasus Boots', 'Hookshot']], + ["Hookshot Cave - Bottom Left", True, ['Pegasus Boots', 'Hookshot', 'Bomb Upgrade (50)']], ["Hookshot Cave - Top Left", False, []], ["Hookshot Cave - Top Left", False, [], ['Hookshot']], ["Hookshot Cave - Top Left", False, [], ['Progressive Glove', 'Pegasus Boots', 'Magic Mirror']], - ["Hookshot Cave - Top Left", True, ['Pegasus Boots', 'Hookshot']], + ["Hookshot Cave - Top Left", True, ['Pegasus Boots', 'Hookshot', 'Bomb Upgrade (50)']], ["Hookshot Cave - Top Right", False, []], ["Hookshot Cave - Top Right", False, [], ['Hookshot']], ["Hookshot Cave - Top Right", False, [], ['Progressive Glove', 'Pegasus Boots', 'Magic Mirror']], - ["Hookshot Cave - Top Right", True, ['Pegasus Boots', 'Hookshot']], + ["Hookshot Cave - Top Right", True, ['Pegasus Boots', 'Hookshot', 'Bomb Upgrade (50)']], ]) \ No newline at end of file diff --git a/worlds/alttp/test/owg/TestDeathMountain.py b/worlds/alttp/test/owg/TestDeathMountain.py index 0933b2881e2d..59308b65f092 100644 --- a/worlds/alttp/test/owg/TestDeathMountain.py +++ b/worlds/alttp/test/owg/TestDeathMountain.py @@ -177,7 +177,7 @@ def testEastDarkWorldDeathMountain(self): ["Hookshot Cave - Bottom Right", False, []], ["Hookshot Cave - Bottom Right", False, [], ['Progressive Glove', 'Pegasus Boots']], ["Hookshot Cave - Bottom Right", False, [], ['Moon Pearl']], - ["Hookshot Cave - Bottom Right", True, ['Moon Pearl', 'Pegasus Boots']], + ["Hookshot Cave - Bottom Right", True, ['Moon Pearl', 'Pegasus Boots', 'Bomb Upgrade (50)']], ["Hookshot Cave - Bottom Right", True, ['Moon Pearl', 'Progressive Glove', 'Progressive Glove', 'Hookshot', 'Flute']], ["Hookshot Cave - Bottom Right", True, ['Moon Pearl', 'Progressive Glove', 'Progressive Glove', 'Hookshot', 'Lamp']], @@ -185,7 +185,7 @@ def testEastDarkWorldDeathMountain(self): ["Hookshot Cave - Bottom Left", False, [], ['Progressive Glove', 'Pegasus Boots']], ["Hookshot Cave - Bottom Left", False, [], ['Moon Pearl']], ["Hookshot Cave - Bottom Left", False, [], ['Hookshot']], - ["Hookshot Cave - Bottom Left", True, ['Moon Pearl', 'Pegasus Boots', 'Hookshot']], + ["Hookshot Cave - Bottom Left", True, ['Moon Pearl', 'Pegasus Boots', 'Hookshot', 'Bomb Upgrade (50)']], ["Hookshot Cave - Bottom Left", True, ['Moon Pearl', 'Progressive Glove', 'Progressive Glove', 'Hookshot', 'Flute']], ["Hookshot Cave - Bottom Left", True, ['Moon Pearl', 'Progressive Glove', 'Progressive Glove', 'Hookshot', 'Lamp']], @@ -193,7 +193,7 @@ def testEastDarkWorldDeathMountain(self): ["Hookshot Cave - Top Left", False, [], ['Progressive Glove', 'Pegasus Boots']], ["Hookshot Cave - Top Left", False, [], ['Moon Pearl']], ["Hookshot Cave - Top Left", False, [], ['Hookshot']], - ["Hookshot Cave - Top Left", True, ['Moon Pearl', 'Pegasus Boots', 'Hookshot']], + ["Hookshot Cave - Top Left", True, ['Moon Pearl', 'Pegasus Boots', 'Hookshot', 'Bomb Upgrade (50)']], ["Hookshot Cave - Top Left", True, ['Moon Pearl', 'Progressive Glove', 'Progressive Glove', 'Hookshot', 'Flute']], ["Hookshot Cave - Top Left", True, ['Moon Pearl', 'Progressive Glove', 'Progressive Glove', 'Hookshot', 'Lamp']], @@ -201,7 +201,7 @@ def testEastDarkWorldDeathMountain(self): ["Hookshot Cave - Top Right", False, [], ['Progressive Glove', 'Pegasus Boots']], ["Hookshot Cave - Top Right", False, [], ['Moon Pearl']], ["Hookshot Cave - Top Right", False, [], ['Hookshot']], - ["Hookshot Cave - Top Right", True, ['Moon Pearl', 'Pegasus Boots', 'Hookshot']], + ["Hookshot Cave - Top Right", True, ['Moon Pearl', 'Pegasus Boots', 'Hookshot', 'Bomb Upgrade (50)']], ["Hookshot Cave - Top Right", True, ['Moon Pearl', 'Progressive Glove', 'Progressive Glove', 'Hookshot', 'Flute']], ["Hookshot Cave - Top Right", True, ['Moon Pearl', 'Progressive Glove', 'Progressive Glove', 'Hookshot', 'Lamp']], ]) \ No newline at end of file From 480c15eea02ae1da3b0c80217254f538fae6d417 Mon Sep 17 00:00:00 2001 From: Scipio Wright Date: Sun, 14 Apr 2024 13:59:34 -0400 Subject: [PATCH 041/153] TUNIC: Fix entrance rule for unrestricted + ladders - entrance rando (#3076) --- worlds/tunic/er_rules.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/worlds/tunic/er_rules.py b/worlds/tunic/er_rules.py index 09972db2e5cc..c6f9e242df7a 100644 --- a/worlds/tunic/er_rules.py +++ b/worlds/tunic/er_rules.py @@ -1226,12 +1226,12 @@ def get_portal_info(portal_sd: str) -> Tuple[str, str]: and (has_ladder("Ladders in Swamp", state, player, options) or has_ice_grapple_logic(True, state, player, options, ability_unlocks) or not options.entrance_rando)) + # soft locked without this ladder elif portal_name == "West Garden Exit after Boss" and not options.entrance_rando: regions[region_name].connect( regions[paired_region], name=portal_name + " (LS) " + region_name, rule=lambda state: has_stick(state, player) - and state.has_any(ladders, player) and (state.has("Ladders to West Bell", player))) # soft locked unless you have either ladder. if you have laurels, you use the other Entrance elif portal_name in {"Furnace Exit towards West Garden", "Furnace Exit to Dark Tomb"} \ From 87b9f4a6fa33c7c33d4e57fa7e212a203656ae78 Mon Sep 17 00:00:00 2001 From: PoryGone <98504756+PoryGone@users.noreply.github.com> Date: Sun, 14 Apr 2024 14:05:16 -0400 Subject: [PATCH 042/153] Spoiler: Display all precollected items in the Spoiler Log (#2928) --- BaseClasses.py | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/BaseClasses.py b/BaseClasses.py index b03d24e5ce89..9e2b657c39bc 100644 --- a/BaseClasses.py +++ b/BaseClasses.py @@ -1349,6 +1349,7 @@ def get_path(state: CollectionState, region: Region) -> List[Union[Tuple[str, st get_path(state, multiworld.get_region('Inverted Big Bomb Shop', player)) def to_file(self, filename: str) -> None: + from itertools import chain from worlds import AutoWorld def write_option(option_key: str, option_obj: Options.AssembleOptions) -> None: @@ -1385,6 +1386,14 @@ def write_option(option_key: str, option_obj: Options.AssembleOptions) -> None: AutoWorld.call_all(self.multiworld, "write_spoiler", outfile) + precollected_items = [f"{item.name} ({self.multiworld.get_player_name(item.player)})" + if self.multiworld.players > 1 + else item.name + for item in chain.from_iterable(self.multiworld.precollected_items.values())] + if precollected_items: + outfile.write("\n\nStarting Items:\n\n") + outfile.write("\n".join([item for item in precollected_items])) + locations = [(str(location), str(location.item) if location.item is not None else "Nothing") for location in self.multiworld.get_locations() if location.show_in_spoiler] outfile.write('\n\nLocations:\n\n') From f1765899c4ec5fbdae99b952e9502b9ddd4a47bb Mon Sep 17 00:00:00 2001 From: Silvris <58583688+Silvris@users.noreply.github.com> Date: Sun, 14 Apr 2024 13:16:45 -0500 Subject: [PATCH 043/153] MultiServer: add all worlds goal completion message (#2956) --- MultiServer.py | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/MultiServer.py b/MultiServer.py index f12e96c8fbf4..4c9076b11974 100644 --- a/MultiServer.py +++ b/MultiServer.py @@ -1837,6 +1837,11 @@ def update_client_status(ctx: Context, client: Client, new_status: ClientStatus) if current != ClientStatus.CLIENT_GOAL: # can't undo goal completion if new_status == ClientStatus.CLIENT_GOAL: ctx.on_goal_achieved(client) + # if player has yet to ever connect to the server, they will not be in client_game_state + if all(player in ctx.client_game_state and ctx.client_game_state[player] == ClientStatus.CLIENT_GOAL + for player in ctx.player_names + if player[0] == client.team and player[1] != client.slot): + ctx.broadcast_text_all(f"Team #{client.team + 1} has completed all of their games! Congratulations!") ctx.client_game_state[client.team, client.slot] = new_status ctx.on_client_status_change(client.team, client.slot) From 7c44d749d4020a364ce57bed667fbdc28b7c108f Mon Sep 17 00:00:00 2001 From: NewSoupVi <57900059+NewSoupVi@users.noreply.github.com> Date: Sun, 14 Apr 2024 20:22:12 +0200 Subject: [PATCH 044/153] MultiServer: Support location name groups in !missing and !checked commands (#2538) --- MultiServer.py | 14 ++++++++++++-- 1 file changed, 12 insertions(+), 2 deletions(-) diff --git a/MultiServer.py b/MultiServer.py index 4c9076b11974..e1f524ced756 100644 --- a/MultiServer.py +++ b/MultiServer.py @@ -1345,6 +1345,7 @@ def _cmd_remaining(self) -> bool: "Sorry, !remaining requires you to have beaten the game on this server") return False + @mark_raw def _cmd_missing(self, filter_text="") -> bool: """List all missing location checks from the server's perspective. Can be given text, which will be used as filter.""" @@ -1354,7 +1355,11 @@ def _cmd_missing(self, filter_text="") -> bool: if locations: names = [self.ctx.location_names[location] for location in locations] if filter_text: - names = [name for name in names if filter_text in name] + location_groups = self.ctx.location_name_groups[self.ctx.games[self.client.slot]] + if filter_text in location_groups: # location group name + names = [name for name in names if name in location_groups[filter_text]] + else: + names = [name for name in names if filter_text in name] texts = [f'Missing: {name}' for name in names] if filter_text: texts.append(f"Found {len(locations)} missing location checks, displaying {len(names)} of them.") @@ -1365,6 +1370,7 @@ def _cmd_missing(self, filter_text="") -> bool: self.output("No missing location checks found.") return True + @mark_raw def _cmd_checked(self, filter_text="") -> bool: """List all done location checks from the server's perspective. Can be given text, which will be used as filter.""" @@ -1374,7 +1380,11 @@ def _cmd_checked(self, filter_text="") -> bool: if locations: names = [self.ctx.location_names[location] for location in locations] if filter_text: - names = [name for name in names if filter_text in name] + location_groups = self.ctx.location_name_groups[self.ctx.games[self.client.slot]] + if filter_text in location_groups: # location group name + names = [name for name in names if name in location_groups[filter_text]] + else: + names = [name for name in names if filter_text in name] texts = [f'Checked: {name}' for name in names] if filter_text: texts.append(f"Found {len(locations)} done location checks, displaying {len(names)} of them.") From d1274c12b9b592ac868a819d184a42c40343b589 Mon Sep 17 00:00:00 2001 From: Justus Lind Date: Mon, 15 Apr 2024 04:23:13 +1000 Subject: [PATCH 045/153] Muse Dash: Add filler items and rework generation balance (#2809) --- worlds/musedash/MuseDashCollection.py | 14 ++- worlds/musedash/Options.py | 19 ++-- worlds/musedash/Presets.py | 3 - worlds/musedash/__init__.py | 94 ++++++++++++-------- worlds/musedash/test/TestDifficultyRanges.py | 6 +- worlds/musedash/test/__init__.py | 2 +- 6 files changed, 77 insertions(+), 61 deletions(-) diff --git a/worlds/musedash/MuseDashCollection.py b/worlds/musedash/MuseDashCollection.py index c223893df66b..68e4ad5912bc 100644 --- a/worlds/musedash/MuseDashCollection.py +++ b/worlds/musedash/MuseDashCollection.py @@ -66,7 +66,19 @@ class MuseDashCollections: "Error SFX Trap": STARTING_CODE + 9, } - item_names_to_id: ChainMap = ChainMap({}, sfx_trap_items, vfx_trap_items) + filler_items: Dict[str, int] = { + "Great To Perfect (10 Pack)": STARTING_CODE + 30, + "Miss To Great (5 Pack)": STARTING_CODE + 31, + "Extra Life": STARTING_CODE + 32, + } + + filler_item_weights: Dict[str, int] = { + "Great To Perfect (10 Pack)": 10, + "Miss To Great (5 Pack)": 3, + "Extra Life": 1, + } + + item_names_to_id: ChainMap = ChainMap({}, filler_items, sfx_trap_items, vfx_trap_items) location_names_to_id: ChainMap = ChainMap(song_locations, album_locations) def __init__(self) -> None: diff --git a/worlds/musedash/Options.py b/worlds/musedash/Options.py index 26ad5ff5d967..b695395135f6 100644 --- a/worlds/musedash/Options.py +++ b/worlds/musedash/Options.py @@ -4,11 +4,13 @@ from .MuseDashCollection import MuseDashCollections + class AllowJustAsPlannedDLCSongs(Toggle): """Whether [Muse Plus] DLC Songs, and all the albums included in it, can be chosen as randomised songs. Note: The [Just As Planned] DLC contains all [Muse Plus] songs.""" display_name = "Allow [Muse Plus] DLC Songs" + class DLCMusicPacks(OptionSet): """Which non-[Muse Plus] DLC packs can be chosen as randomised songs.""" display_name = "DLC Packs" @@ -101,20 +103,10 @@ class GradeNeeded(Choice): default = 0 -class AdditionalItemPercentage(Range): - """The percentage of songs that will have 2 items instead of 1 when completing them. - - Starting Songs will always have 2 items. - - Locations will be filled with duplicate songs if there are not enough items. - """ - display_name = "Additional Item %" - range_start = 50 - default = 80 - range_end = 100 - - class MusicSheetCountPercentage(Range): - """Collecting enough Music Sheets will unlock the goal song needed for completion. - This option controls how many are in the item pool, based on the total number of songs.""" + """Controls how many music sheets are added to the pool based on the number of songs, including starting songs. + Higher numbers leads to more consistent game lengths, but will cause individual music sheets to be less important. + """ range_start = 10 range_end = 40 default = 20 @@ -175,7 +167,6 @@ class MuseDashOptions(PerGameCommonOptions): streamer_mode_enabled: StreamerModeEnabled starting_song_count: StartingSongs additional_song_count: AdditionalSongs - additional_item_percentage: AdditionalItemPercentage song_difficulty_mode: DifficultyMode song_difficulty_min: DifficultyModeOverrideMin song_difficulty_max: DifficultyModeOverrideMax diff --git a/worlds/musedash/Presets.py b/worlds/musedash/Presets.py index 64591118021e..8dd8507d9b7f 100644 --- a/worlds/musedash/Presets.py +++ b/worlds/musedash/Presets.py @@ -6,7 +6,6 @@ "allow_just_as_planned_dlc_songs": False, "starting_song_count": 5, "additional_song_count": 34, - "additional_item_percentage": 80, "music_sheet_count_percentage": 20, "music_sheet_win_count_percentage": 90, }, @@ -15,7 +14,6 @@ "allow_just_as_planned_dlc_songs": True, "starting_song_count": 5, "additional_song_count": 34, - "additional_item_percentage": 80, "music_sheet_count_percentage": 20, "music_sheet_win_count_percentage": 90, }, @@ -24,7 +22,6 @@ "allow_just_as_planned_dlc_songs": True, "starting_song_count": 8, "additional_song_count": 91, - "additional_item_percentage": 80, "music_sheet_count_percentage": 20, "music_sheet_win_count_percentage": 90, }, diff --git a/worlds/musedash/__init__.py b/worlds/musedash/__init__.py index af2d4cc207da..1c009bfaee45 100644 --- a/worlds/musedash/__init__.py +++ b/worlds/musedash/__init__.py @@ -57,6 +57,8 @@ class MuseDashWorld(World): # Necessary Data md_collection = MuseDashCollections() + filler_item_names = list(md_collection.filler_item_weights.keys()) + filler_item_weights = list(md_collection.filler_item_weights.values()) item_name_to_id = {name: code for name, code in md_collection.item_names_to_id.items()} location_name_to_id = {name: code for name, code in md_collection.location_names_to_id.items()} @@ -70,7 +72,7 @@ class MuseDashWorld(World): def generate_early(self): dlc_songs = {key for key in self.options.dlc_packs.value} - if (self.options.allow_just_as_planned_dlc_songs.value): + if self.options.allow_just_as_planned_dlc_songs.value: dlc_songs.add(self.md_collection.MUSE_PLUS_DLC) streamer_mode = self.options.streamer_mode_enabled @@ -84,7 +86,7 @@ def generate_early(self): while True: # In most cases this should only need to run once available_song_keys = self.md_collection.get_songs_with_settings( - dlc_songs, streamer_mode, lower_diff_threshold, higher_diff_threshold) + dlc_songs, bool(streamer_mode.value), lower_diff_threshold, higher_diff_threshold) available_song_keys = self.handle_plando(available_song_keys) @@ -161,19 +163,17 @@ def create_song_pool(self, available_song_keys: List[str]): break self.included_songs.append(available_song_keys.pop()) - self.location_count = len(self.starting_songs) + len(self.included_songs) - location_multiplier = 1 + (self.get_additional_item_percentage() / 100.0) - self.location_count = floor(self.location_count * location_multiplier) - - minimum_location_count = len(self.included_songs) + self.get_music_sheet_count() - if self.location_count < minimum_location_count: - self.location_count = minimum_location_count + self.location_count = 2 * (len(self.starting_songs) + len(self.included_songs)) def create_item(self, name: str) -> Item: if name == self.md_collection.MUSIC_SHEET_NAME: return MuseDashFixedItem(name, ItemClassification.progression_skip_balancing, self.md_collection.MUSIC_SHEET_CODE, self.player) + filler = self.md_collection.filler_items.get(name) + if filler: + return MuseDashFixedItem(name, ItemClassification.filler, filler, self.player) + trap = self.md_collection.vfx_trap_items.get(name) if trap: return MuseDashFixedItem(name, ItemClassification.trap, trap, self.player) @@ -189,6 +189,9 @@ def create_item(self, name: str) -> Item: song = self.md_collection.song_items.get(name) return MuseDashSongItem(name, self.player, song) + def get_filler_item_name(self) -> str: + return self.random.choices(self.filler_item_names, self.filler_item_weights)[0] + def create_items(self) -> None: song_keys_in_pool = self.included_songs.copy() @@ -199,8 +202,13 @@ def create_items(self) -> None: for _ in range(0, item_count): self.multiworld.itempool.append(self.create_item(self.md_collection.MUSIC_SHEET_NAME)) - # Then add all traps - trap_count = self.get_trap_count() + # Then add 1 copy of every song + item_count += len(self.included_songs) + for song in self.included_songs: + self.multiworld.itempool.append(self.create_item(song)) + + # Then add all traps, making sure we don't over fill + trap_count = min(self.location_count - item_count, self.get_trap_count()) trap_list = self.get_available_traps() if len(trap_list) > 0 and trap_count > 0: for _ in range(0, trap_count): @@ -209,23 +217,38 @@ def create_items(self) -> None: item_count += trap_count - # Next fill all remaining slots with song items - needed_item_count = self.location_count - while item_count < needed_item_count: - # If we have more items needed than keys, just iterate the list and add them all - if len(song_keys_in_pool) <= needed_item_count - item_count: - for key in song_keys_in_pool: - self.multiworld.itempool.append(self.create_item(key)) + # At this point, if a player is using traps, it's possible that they have filled all locations + items_left = self.location_count - item_count + if items_left <= 0: + return + + # When it comes to filling remaining spaces, we have 2 options. A useless filler or additional songs. + # First fill 50% with the filler. The rest is to be duplicate songs. + filler_count = floor(0.5 * items_left) + items_left -= filler_count - item_count += len(song_keys_in_pool) - continue + for _ in range(0, filler_count): + self.multiworld.itempool.append(self.create_item(self.get_filler_item_name())) - # Otherwise add a random assortment of songs - self.random.shuffle(song_keys_in_pool) - for i in range(0, needed_item_count - item_count): - self.multiworld.itempool.append(self.create_item(song_keys_in_pool[i])) + # All remaining spots are filled with duplicate songs. Duplicates are set to useful instead of progression + # to cut down on the number of progression items that Muse Dash puts into the pool. - item_count = needed_item_count + # This is for the extraordinary case of needing to fill a lot of items. + while items_left > len(song_keys_in_pool): + for key in song_keys_in_pool: + item = self.create_item(key) + item.classification = ItemClassification.useful + self.multiworld.itempool.append(item) + + items_left -= len(song_keys_in_pool) + continue + + # Otherwise add a random assortment of songs + self.random.shuffle(song_keys_in_pool) + for i in range(0, items_left): + item = self.create_item(song_keys_in_pool[i]) + item.classification = ItemClassification.useful + self.multiworld.itempool.append(item) def create_regions(self) -> None: menu_region = Region("Menu", self.player, self.multiworld) @@ -245,8 +268,6 @@ def create_regions(self) -> None: self.random.shuffle(included_song_copy) all_selected_locations.extend(included_song_copy) - two_item_location_count = self.location_count - len(all_selected_locations) - # Make a region per song/album, then adds 1-2 item locations to them for i in range(0, len(all_selected_locations)): name = all_selected_locations[i] @@ -254,10 +275,11 @@ def create_regions(self) -> None: self.multiworld.regions.append(region) song_select_region.connect(region, name, lambda state, place=name: state.has(place, self.player)) - # Up to 2 Locations are defined per song - region.add_locations({name + "-0": self.md_collection.song_locations[name + "-0"]}, MuseDashLocation) - if i < two_item_location_count: - region.add_locations({name + "-1": self.md_collection.song_locations[name + "-1"]}, MuseDashLocation) + # Muse Dash requires 2 locations per song to be *interesting*. Balanced out by filler. + region.add_locations({ + name + "-0": self.md_collection.song_locations[name + "-0"], + name + "-1": self.md_collection.song_locations[name + "-1"] + }, MuseDashLocation) def set_rules(self) -> None: self.multiworld.completion_condition[self.player] = lambda state: \ @@ -276,19 +298,14 @@ def get_available_traps(self) -> List[str]: return trap_list - def get_additional_item_percentage(self) -> int: - trap_count = self.options.trap_count_percentage.value - song_count = self.options.music_sheet_count_percentage.value - return max(trap_count + song_count, self.options.additional_item_percentage.value) - def get_trap_count(self) -> int: multiplier = self.options.trap_count_percentage.value / 100.0 - trap_count = (len(self.starting_songs) * 2) + len(self.included_songs) + trap_count = len(self.starting_songs) + len(self.included_songs) return max(0, floor(trap_count * multiplier)) def get_music_sheet_count(self) -> int: multiplier = self.options.music_sheet_count_percentage.value / 100.0 - song_count = (len(self.starting_songs) * 2) + len(self.included_songs) + song_count = len(self.starting_songs) + len(self.included_songs) return max(1, floor(song_count * multiplier)) def get_music_sheet_win_count(self) -> int: @@ -329,5 +346,4 @@ def fill_slot_data(self): "deathLink": self.options.death_link.value, "musicSheetWinCount": self.get_music_sheet_win_count(), "gradeNeeded": self.options.grade_needed.value, - "hasFiller": True, } diff --git a/worlds/musedash/test/TestDifficultyRanges.py b/worlds/musedash/test/TestDifficultyRanges.py index 29a9a3ef1563..89214d3f0f88 100644 --- a/worlds/musedash/test/TestDifficultyRanges.py +++ b/worlds/musedash/test/TestDifficultyRanges.py @@ -5,9 +5,9 @@ class DifficultyRanges(MuseDashTestBase): def test_all_difficulty_ranges(self) -> None: muse_dash_world = self.multiworld.worlds[1] dlc_set = {x for x in muse_dash_world.md_collection.DLC} - difficulty_choice = self.multiworld.song_difficulty_mode[1] - difficulty_min = self.multiworld.song_difficulty_min[1] - difficulty_max = self.multiworld.song_difficulty_max[1] + difficulty_choice = muse_dash_world.options.song_difficulty_mode + difficulty_min = muse_dash_world.options.song_difficulty_min + difficulty_max = muse_dash_world.options.song_difficulty_max def test_range(inputRange, lower, upper): self.assertEqual(inputRange[0], lower) diff --git a/worlds/musedash/test/__init__.py b/worlds/musedash/test/__init__.py index 818fd357cd97..c77f9f6a06b8 100644 --- a/worlds/musedash/test/__init__.py +++ b/worlds/musedash/test/__init__.py @@ -1,4 +1,4 @@ -from test.TestBase import WorldTestBase +from test.bases import WorldTestBase class MuseDashTestBase(WorldTestBase): From 7b3727e945b580436cd040600f67957d7741808b Mon Sep 17 00:00:00 2001 From: Fabian Dill Date: Sun, 14 Apr 2024 20:36:08 +0200 Subject: [PATCH 046/153] CommonClient: set max_size to 16 MB (#3124) --- CommonClient.py | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/CommonClient.py b/CommonClient.py index 085a48a4b74b..88a2c512d53b 100644 --- a/CommonClient.py +++ b/CommonClient.py @@ -193,6 +193,7 @@ class CommonContext: server_version: Version = Version(0, 0, 0) generator_version: Version = Version(0, 0, 0) current_energy_link_value: typing.Optional[int] = None # to display in UI, gets set by server + max_size: int = 16*1024*1024 # 16 MB of max incoming packet size last_death_link: float = time.time() # last send/received death link on AP layer @@ -651,7 +652,8 @@ def reconnect_hint() -> str: try: port = server_url.port or 38281 # raises ValueError if invalid socket = await websockets.connect(address, port=port, ping_timeout=None, ping_interval=None, - ssl=get_ssl_context() if address.startswith("wss://") else None) + ssl=get_ssl_context() if address.startswith("wss://") else None, + max_size=ctx.max_size) if ctx.ui is not None: ctx.ui.update_address_bar(server_url.netloc) ctx.server = Endpoint(socket) From 1c14d1107f2df8f5e2691a2063152c506b5df2fa Mon Sep 17 00:00:00 2001 From: Fabian Dill Date: Sun, 14 Apr 2024 20:36:25 +0200 Subject: [PATCH 047/153] Subnautica: filler items distribution (#3104) --- worlds/subnautica/__init__.py | 19 ++++++++----- worlds/subnautica/items.py | 3 +++ worlds/subnautica/options.py | 50 +++++++++++++++++++++++++++-------- 3 files changed, 54 insertions(+), 18 deletions(-) diff --git a/worlds/subnautica/__init__.py b/worlds/subnautica/__init__.py index e9341ec3b9de..08df70d78bbd 100644 --- a/worlds/subnautica/__init__.py +++ b/worlds/subnautica/__init__.py @@ -4,7 +4,7 @@ import itertools from typing import List, Dict, Any, cast -from BaseClasses import Region, Entrance, Location, Item, Tutorial, ItemClassification +from BaseClasses import Region, Location, Item, Tutorial, ItemClassification from worlds.AutoWorld import World, WebWorld from . import items from . import locations @@ -42,14 +42,16 @@ class SubnauticaWorld(World): item_name_to_id = {data.name: item_id for item_id, data in items.item_table.items()} location_name_to_id = all_locations - option_definitions = options.option_definitions - + options_dataclass = options.SubnauticaOptions + options: options.SubnauticaOptions data_version = 10 required_client_version = (0, 4, 1) creatures_to_scan: List[str] def generate_early(self) -> None: + if not self.options.filler_items_distribution.weights_pair[1][-1]: + raise Exception("Filler Items Distribution needs at least one positive weight.") if self.options.early_seaglide: self.multiworld.local_early_items[self.player]["Seaglide Fragment"] = 2 @@ -98,7 +100,7 @@ def create_regions(self): planet_region ] - # refer to Rules.py + # refer to rules.py set_rules = set_rules def create_items(self): @@ -129,7 +131,7 @@ def create_items(self): extras -= group_amount for item_name in self.random.sample( - # list of high-count important fragments as priority filler + # list of high-count important fragments as priority filler [ "Cyclops Engine Fragment", "Cyclops Hull Fragment", @@ -140,7 +142,7 @@ def create_items(self): "Modification Station Fragment", "Moonpool Fragment", "Laser Cutter Fragment", - ], + ], k=min(extras, 9)): item = self.create_item(item_name) pool.append(item) @@ -176,7 +178,10 @@ def create_item(self, name: str) -> SubnauticaItem: item_id, player=self.player) def get_filler_item_name(self) -> str: - return item_table[self.multiworld.random.choice(items_by_type[ItemType.resource])].name + item_names, cum_item_weights = self.options.filler_items_distribution.weights_pair + return self.random.choices(item_names, + cum_weights=cum_item_weights, + k=1)[0] class SubnauticaLocation(Location): diff --git a/worlds/subnautica/items.py b/worlds/subnautica/items.py index bffc84324147..d5dcf6a6af25 100644 --- a/worlds/subnautica/items.py +++ b/worlds/subnautica/items.py @@ -145,6 +145,9 @@ def make_resource_bundle_data(display_name: str, internal_name: str = "") -> Ite items_by_type: Dict[ItemType, List[int]] = {item_type: [] for item_type in ItemType} for item_id, item_data in item_table.items(): items_by_type[item_data.type].append(item_id) +item_names_by_type: Dict[ItemType, List[str]] = { + item_type: sorted(item_table[item_id].name for item_id in item_ids) for item_type, item_ids in items_by_type.items() +} group_items: Dict[int, Set[int]] = { 35100: {35025, 35047, 35048, 35056, 35057, 35058, 35059, 35060, 35061, 35062, 35063, 35064, 35065, 35067, 35068, diff --git a/worlds/subnautica/options.py b/worlds/subnautica/options.py index d8d727a9e159..6554425dc7e4 100644 --- a/worlds/subnautica/options.py +++ b/worlds/subnautica/options.py @@ -1,7 +1,20 @@ import typing +from dataclasses import dataclass +from functools import cached_property + +from Options import ( + Choice, + Range, + DeathLink, + Toggle, + DefaultOnToggle, + StartInventoryPool, + ItemDict, + PerGameCommonOptions, +) -from Options import Choice, Range, DeathLink, Toggle, DefaultOnToggle, StartInventoryPool from .creatures import all_creatures, Definitions +from .items import ItemType, item_names_by_type class SwimRule(Choice): @@ -103,13 +116,28 @@ class SubnauticaDeathLink(DeathLink): Note: can be toggled via in-game console command "deathlink".""" -option_definitions = { - "swim_rule": SwimRule, - "early_seaglide": EarlySeaglide, - "free_samples": FreeSamples, - "goal": Goal, - "creature_scans": CreatureScans, - "creature_scan_logic": AggressiveScanLogic, - "death_link": SubnauticaDeathLink, - "start_inventory_from_pool": StartInventoryPool, -} +class FillerItemsDistribution(ItemDict): + """Random chance weights of various filler resources that can be obtained. + Available items: """ + __doc__ += ", ".join(f"\"{item_name}\"" for item_name in item_names_by_type[ItemType.resource]) + _valid_keys = frozenset(item_names_by_type[ItemType.resource]) + default = {item_name: 1 for item_name in item_names_by_type[ItemType.resource]} + display_name = "Filler Items Distribution" + + @cached_property + def weights_pair(self) -> typing.Tuple[typing.List[str], typing.List[int]]: + from itertools import accumulate + return list(self.value.keys()), list(accumulate(self.value.values())) + + +@dataclass +class SubnauticaOptions(PerGameCommonOptions): + swim_rule: SwimRule + early_seaglide: EarlySeaglide + free_samples: FreeSamples + goal: Goal + creature_scans: CreatureScans + creature_scan_logic: AggressiveScanLogic + death_link: SubnauticaDeathLink + start_inventory_from_pool: StartInventoryPool + filler_items_distribution: FillerItemsDistribution From 19f1b265b1f6478d7ae678fb6016f0ed5761aab8 Mon Sep 17 00:00:00 2001 From: Fabian Dill Date: Sun, 14 Apr 2024 20:36:36 +0200 Subject: [PATCH 048/153] LttP: deprioritize locked locations for ingame hints (#3127) --- worlds/alttp/Rom.py | 3 +++ 1 file changed, 3 insertions(+) diff --git a/worlds/alttp/Rom.py b/worlds/alttp/Rom.py index 274aceba57dc..80f7ab7fbec9 100644 --- a/worlds/alttp/Rom.py +++ b/worlds/alttp/Rom.py @@ -2397,6 +2397,9 @@ def hint_text(dest, ped_hint=False): if hint_count: locations = world.find_items_in_locations(items_to_hint, player, True) local_random.shuffle(locations) + # make locked locations less likely to appear as hint, + # chances are the lock means the player already knows. + locations.sort(key=lambda sorting_location: not sorting_location.locked) for x in range(min(hint_count, len(locations))): this_location = locations.pop() this_hint = this_location.item.hint_text + ' can be found ' + hint_text(this_location) + '.' From f67e8497e00456bbc7ccd6706bce788a29adb95b Mon Sep 17 00:00:00 2001 From: Fabian Dill Date: Sun, 14 Apr 2024 20:36:55 +0200 Subject: [PATCH 049/153] kvui: use all flags in Item Class tooltip (#3011) --- kvui.py | 18 ++++++++++-------- 1 file changed, 10 insertions(+), 8 deletions(-) diff --git a/kvui.py b/kvui.py index fba32049295a..a1663126cc71 100644 --- a/kvui.py +++ b/kvui.py @@ -740,15 +740,17 @@ def __call__(self, *args, **kwargs): def _handle_item_name(self, node: JSONMessagePart): flags = node.get("flags", 0) + item_types = [] if flags & 0b001: # advancement - itemtype = "progression" - elif flags & 0b010: # useful - itemtype = "useful" - elif flags & 0b100: # trap - itemtype = "trap" - else: - itemtype = "normal" - node.setdefault("refs", []).append("Item Class: " + itemtype) + item_types.append("progression") + if flags & 0b010: # useful + item_types.append("useful") + if flags & 0b100: # trap + item_types.append("trap") + if not item_types: + item_types.append("normal") + + node.setdefault("refs", []).append("Item Class: " + ", ".join(item_types)) return super(KivyJSONtoTextParser, self)._handle_item_name(node) def _handle_player_id(self, node: JSONMessagePart): From 842a15fd3c04705598e549a9d5547a5f76b9df9f Mon Sep 17 00:00:00 2001 From: Aaron Wagener Date: Sun, 14 Apr 2024 13:37:48 -0500 Subject: [PATCH 050/153] Core: replace `Location.event` with `advancement` property (#2871) --- BaseClasses.py | 13 ++-- Fill.py | 10 +--- docs/world api.md | 5 -- test/bases.py | 2 +- test/general/test_fill.py | 12 ++-- worlds/alttp/ItemPool.py | 4 +- worlds/alttp/Rules.py | 1 - worlds/checksfinder/Locations.py | 4 -- worlds/dlcquest/__init__.py | 2 +- worlds/dlcquest/test/checks/world_checks.py | 4 +- worlds/generic/Rules.py | 2 +- worlds/ladx/Locations.py | 8 +-- worlds/ladx/__init__.py | 2 +- worlds/meritous/Locations.py | 5 -- worlds/oot/Location.py | 5 +- worlds/oot/__init__.py | 4 +- worlds/overcooked2/__init__.py | 2 - worlds/pokemon_rb/__init__.py | 1 - worlds/pokemon_rb/encounters.py | 2 - worlds/pokemon_rb/regions.py | 1 - worlds/sc2wol/Regions.py | 0 worlds/smz3/__init__.py | 2 - worlds/soe/__init__.py | 1 - worlds/spire/__init__.py | 6 -- worlds/stardew_valley/__init__.py | 6 +- worlds/stardew_valley/test/TestGeneration.py | 60 +++++++++---------- worlds/stardew_valley/test/TestRules.py | 31 +++++----- worlds/stardew_valley/test/__init__.py | 4 +- .../test/assertion/mod_assert.py | 2 +- .../test/assertion/world_assert.py | 4 +- worlds/timespinner/Regions.py | 1 - worlds/tloz/__init__.py | 1 - worlds/undertale/Locations.py | 4 -- worlds/wargroove/__init__.py | 6 -- worlds/zork_grand_inquisitor/world.py | 4 +- 35 files changed, 78 insertions(+), 143 deletions(-) create mode 100644 worlds/sc2wol/Regions.py diff --git a/BaseClasses.py b/BaseClasses.py index 9e2b657c39bc..2738d3ac6c36 100644 --- a/BaseClasses.py +++ b/BaseClasses.py @@ -437,7 +437,7 @@ def push_item(self, location: Location, item: Item, collect: bool = True): location.item = item item.location = location if collect: - self.state.collect(item, location.event, location) + self.state.collect(item, location.advancement, location) logging.debug('Placed %s at %s', item, location) @@ -584,8 +584,7 @@ def location_condition(location: Location): def location_relevant(location: Location): """Determine if this location is relevant to sweep.""" if location.progress_type != LocationProgressType.EXCLUDED \ - and (location.player in players["locations"] or location.event - or (location.item and location.item.advancement)): + and (location.player in players["locations"] or location.advancement): return True return False @@ -730,7 +729,7 @@ def sweep_for_events(self, key_only: bool = False, locations: Optional[Iterable[ locations = self.multiworld.get_filled_locations() reachable_events = True # since the loop has a good chance to run more than once, only filter the events once - locations = {location for location in locations if location.event and location not in self.events and + locations = {location for location in locations if location.advancement and location not in self.events and not key_only or getattr(location.item, "locked_dungeon_item", False)} while reachable_events: reachable_events = {location for location in locations if location.can_reach(self)} @@ -1020,7 +1019,6 @@ class Location: name: str address: Optional[int] parent_region: Optional[Region] - event: bool = False locked: bool = False show_in_spoiler: bool = True progress_type: LocationProgressType = LocationProgressType.DEFAULT @@ -1051,7 +1049,6 @@ def place_locked_item(self, item: Item): raise Exception(f"Location {self} already filled.") self.item = item item.location = self - self.event = item.advancement self.locked = True def __repr__(self): @@ -1067,6 +1064,10 @@ def __hash__(self): def __lt__(self, other: Location): return (self.player, self.name) < (other.player, other.name) + @property + def advancement(self) -> bool: + return self.item is not None and self.item.advancement + @property def is_event(self) -> bool: """Returns True if the address of this location is None, denoting it is an Event Location.""" diff --git a/Fill.py b/Fill.py index 291ea7e882b7..cb143c408e0c 100644 --- a/Fill.py +++ b/Fill.py @@ -159,7 +159,6 @@ def fill_restrictive(multiworld: MultiWorld, base_state: CollectionState, locati multiworld.push_item(spot_to_fill, item_to_place, False) spot_to_fill.locked = lock placements.append(spot_to_fill) - spot_to_fill.event = item_to_place.advancement placed += 1 if not placed % 1000: _log_fill_progress(name, placed, total) @@ -310,7 +309,6 @@ def accessibility_corrections(multiworld: MultiWorld, state: CollectionState, lo pool.append(location.item) state.remove(location.item) location.item = None - location.event = False if location in state.events: state.events.remove(location) locations.append(location) @@ -659,7 +657,7 @@ def item_percentage(player: int, num: int) -> float: while True: # Check locations in the current sphere and gather progression items to swap earlier for location in balancing_sphere: - if location.event: + if location.advancement: balancing_state.collect(location.item, True, location) player = location.item.player # only replace items that end up in another player's world @@ -716,7 +714,7 @@ def item_percentage(player: int, num: int) -> float: # sort then shuffle to maintain deterministic behaviour, # while allowing use of set for better algorithm growth behaviour elsewhere - replacement_locations = sorted(l for l in checked_locations if not l.event and not l.locked) + replacement_locations = sorted(l for l in checked_locations if not l.advancement and not l.locked) multiworld.random.shuffle(replacement_locations) items_to_replace.sort() multiworld.random.shuffle(items_to_replace) @@ -747,7 +745,7 @@ def item_percentage(player: int, num: int) -> float: sphere_locations.add(location) for location in sphere_locations: - if location.event: + if location.advancement: state.collect(location.item, True, location) checked_locations |= sphere_locations @@ -768,7 +766,6 @@ def swap_location_item(location_1: Location, location_2: Location, check_locked: location_2.item, location_1.item = location_1.item, location_2.item location_1.item.location = location_1 location_2.item.location = location_2 - location_1.event, location_2.event = location_2.event, location_1.event def distribute_planned(multiworld: MultiWorld) -> None: @@ -965,7 +962,6 @@ def failed(warning: str, force: typing.Union[bool, str]) -> None: placement['force']) for (item, location) in successful_pairs: multiworld.push_item(location, item, collect=False) - location.event = True # flag location to be checked during fill location.locked = True logging.debug(f"Plando placed {item} at {location}") if from_pool: diff --git a/docs/world api.md b/docs/world api.md index f82ef40a98f8..4f9fc2b1dd54 100644 --- a/docs/world api.md +++ b/docs/world api.md @@ -380,11 +380,6 @@ from BaseClasses import Location class MyGameLocation(Location): game: str = "My Game" - - # override constructor to automatically mark event locations as such - def __init__(self, player: int, name="", code=None, parent=None) -> None: - super(MyGameLocation, self).__init__(player, name, code, parent) - self.event = code is None ``` in your `__init__.py` or your `locations.py`. diff --git a/test/bases.py b/test/bases.py index 07a3e6008629..ee9fbcb683b7 100644 --- a/test/bases.py +++ b/test/bases.py @@ -221,7 +221,7 @@ def remove(self, items: typing.Union[Item, typing.Iterable[Item]]) -> None: if isinstance(items, Item): items = (items,) for item in items: - if item.location and item.location.event and item.location in self.multiworld.state.events: + if item.location and item.advancement and item.location in self.multiworld.state.events: self.multiworld.state.events.remove(item.location) self.multiworld.state.remove(item) diff --git a/test/general/test_fill.py b/test/general/test_fill.py index 70e9e822bff7..7b004db61fee 100644 --- a/test/general/test_fill.py +++ b/test/general/test_fill.py @@ -80,7 +80,6 @@ def fill_region(multiworld: MultiWorld, region: Region, items: List[Item]) -> Li return items item = items.pop(0) multiworld.push_item(location, item, False) - location.event = item.advancement return items @@ -489,7 +488,6 @@ def test_double_sweep(self): player1 = generate_player_data(multiworld, 1, 1, 1) location = player1.locations[0] location.address = None - location.event = True item = player1.prog_items[0] item.code = None location.place_locked_item(item) @@ -527,13 +525,13 @@ def test_basic_distribute(self): distribute_items_restrictive(multiworld) self.assertEqual(locations[0].item, basic_items[1]) - self.assertFalse(locations[0].event) + self.assertFalse(locations[0].advancement) self.assertEqual(locations[1].item, prog_items[0]) - self.assertTrue(locations[1].event) + self.assertTrue(locations[1].advancement) self.assertEqual(locations[2].item, prog_items[1]) - self.assertTrue(locations[2].event) + self.assertTrue(locations[2].advancement) self.assertEqual(locations[3].item, basic_items[0]) - self.assertFalse(locations[3].event) + self.assertFalse(locations[3].advancement) def test_excluded_distribute(self): """Test that distribute_items_restrictive doesn't put advancement items on excluded locations""" @@ -746,7 +744,7 @@ def test_non_excluded_local_items(self): for item in multiworld.get_items(): self.assertEqual(item.player, item.location.player) - self.assertFalse(item.location.event, False) + self.assertFalse(item.location.advancement, False) def test_early_items(self) -> None: """Test that the early items API successfully places items early""" diff --git a/worlds/alttp/ItemPool.py b/worlds/alttp/ItemPool.py index 438c6226bc38..c26c32a7a309 100644 --- a/worlds/alttp/ItemPool.py +++ b/worlds/alttp/ItemPool.py @@ -253,10 +253,8 @@ def generate_itempool(world): region.locations.append(loc) multiworld.push_item(loc, item_factory('Triforce', world), False) - loc.event = True loc.locked = True - multiworld.get_location('Ganon', player).event = True multiworld.get_location('Ganon', player).locked = True event_pairs = [ ('Agahnim 1', 'Beat Agahnim 1'), @@ -273,7 +271,7 @@ def generate_itempool(world): location = multiworld.get_location(location_name, player) event = item_factory(event_name, world) multiworld.push_item(location, event, False) - location.event = location.locked = True + location.locked = True # set up item pool diff --git a/worlds/alttp/Rules.py b/worlds/alttp/Rules.py index 7ff3c757bd78..6646aae1b93e 100644 --- a/worlds/alttp/Rules.py +++ b/worlds/alttp/Rules.py @@ -1193,7 +1193,6 @@ def tr_big_key_chest_keys_needed(state): item = item_factory('Small Key (Turtle Rock)', world.worlds[player]) location = world.get_location('Turtle Rock - Big Key Chest', player) location.place_locked_item(item) - location.event = True toss_junk_item(world, player) if world.accessibility[player] != 'locations': diff --git a/worlds/checksfinder/Locations.py b/worlds/checksfinder/Locations.py index 8a2ae07b27b6..59a96c83ea8a 100644 --- a/worlds/checksfinder/Locations.py +++ b/worlds/checksfinder/Locations.py @@ -10,10 +10,6 @@ class AdvData(typing.NamedTuple): class ChecksFinderAdvancement(Location): game: str = "ChecksFinder" - def __init__(self, player: int, name: str, address: typing.Optional[int], parent): - super().__init__(player, name, address, parent) - self.event = not address - advancement_table = { "Tile 1": AdvData(81000, 'Board'), diff --git a/worlds/dlcquest/__init__.py b/worlds/dlcquest/__init__.py index 2200729a3210..ca2862113fd4 100644 --- a/worlds/dlcquest/__init__.py +++ b/worlds/dlcquest/__init__.py @@ -61,7 +61,7 @@ def create_items(self): self.precollect_coinsanity() locations_count = len([location for location in self.multiworld.get_locations(self.player) - if not location.event]) + if not location.advancement]) items_to_exclude = [excluded_items for excluded_items in self.multiworld.precollected_items[self.player]] diff --git a/worlds/dlcquest/test/checks/world_checks.py b/worlds/dlcquest/test/checks/world_checks.py index a97093d62036..cc2fa7f51ad2 100644 --- a/worlds/dlcquest/test/checks/world_checks.py +++ b/worlds/dlcquest/test/checks/world_checks.py @@ -10,7 +10,7 @@ def get_all_item_names(multiworld: MultiWorld) -> List[str]: def get_all_location_names(multiworld: MultiWorld) -> List[str]: - return [location.name for location in multiworld.get_locations() if not location.event] + return [location.name for location in multiworld.get_locations() if not location.advancement] def assert_victory_exists(tester: DLCQuestTestBase, multiworld: MultiWorld): @@ -38,5 +38,5 @@ 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.event] + 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 diff --git a/worlds/generic/Rules.py b/worlds/generic/Rules.py index c434351e9493..f0eef2248058 100644 --- a/worlds/generic/Rules.py +++ b/worlds/generic/Rules.py @@ -90,7 +90,7 @@ def exclusion_rules(multiworld: MultiWorld, player: int, exclude_locations: typi if loc_name not in multiworld.worlds[player].location_name_to_id: raise Exception(f"Unable to exclude location {loc_name} in player {player}'s world.") from e else: - if not location.event: + if not location.advancement: location.progress_type = LocationProgressType.EXCLUDED else: logging.warning(f"Unable to exclude location {loc_name} in player {player}'s world.") diff --git a/worlds/ladx/Locations.py b/worlds/ladx/Locations.py index c7b127ef2b54..f29355f2ba86 100644 --- a/worlds/ladx/Locations.py +++ b/worlds/ladx/Locations.py @@ -60,13 +60,11 @@ class LinksAwakeningLocation(Location): def __init__(self, player: int, region, ladxr_item): name = meta_to_name(ladxr_item.metadata) + address = None - self.event = ladxr_item.event is not None - if self.event: + if ladxr_item.event is not None: name = ladxr_item.event - - address = None - if not self.event: + else: address = locations_to_id[name] super().__init__(player, name, address) self.parent_region = region diff --git a/worlds/ladx/__init__.py b/worlds/ladx/__init__.py index d662b526bb61..6c7517f359dc 100644 --- a/worlds/ladx/__init__.py +++ b/worlds/ladx/__init__.py @@ -154,7 +154,7 @@ def create_regions(self) -> None: # Place RAFT, other access events for region in regions: for loc in region.locations: - if loc.event: + if loc.address is None: loc.place_locked_item(self.create_event(loc.ladxr_item.event)) # Connect Windfish -> Victory diff --git a/worlds/meritous/Locations.py b/worlds/meritous/Locations.py index 1893b8520e48..690c757efff8 100644 --- a/worlds/meritous/Locations.py +++ b/worlds/meritous/Locations.py @@ -9,11 +9,6 @@ class MeritousLocation(Location): game: str = "Meritous" - def __init__(self, player: int, name: str = '', address: int = None, parent=None): - super(MeritousLocation, self).__init__(player, name, address, parent) - if "Wervyn Anixil" in name or "Defeat" in name: - self.event = True - offset = 593_000 diff --git a/worlds/oot/Location.py b/worlds/oot/Location.py index 3f7d75517e30..f924dd048da1 100644 --- a/worlds/oot/Location.py +++ b/worlds/oot/Location.py @@ -44,14 +44,11 @@ def __init__(self, player, name='', code=None, address1=None, address2=None, self.vanilla_item = vanilla_item if filter_tags is None: self.filter_tags = None - else: + else: self.filter_tags = list(filter_tags) self.never = False # no idea what this does self.disabled = DisableType.ENABLED - if type == 'Event': - self.event = True - @property def dungeon(self): return self.parent_region.dungeon diff --git a/worlds/oot/__init__.py b/worlds/oot/__init__.py index 303529c945f6..d9ee63850eaf 100644 --- a/worlds/oot/__init__.py +++ b/worlds/oot/__init__.py @@ -717,7 +717,6 @@ def make_event_item(self, name, location, item=None): item = self.create_item(name, allow_arbitrary_name=True) self.multiworld.push_item(location, item, collect=False) location.locked = True - location.event = True if name not in item_table: location.internal = True return item @@ -842,7 +841,7 @@ def generate_basic(self): # mostly killing locations that shouldn't exist by se all_state.sweep_for_events(locations=all_locations) reachable = self.multiworld.get_reachable_locations(all_state, self.player) unreachable = [loc for loc in all_locations if - (loc.internal or loc.type == 'Drop') and loc.event and loc.locked and loc not in reachable] + (loc.internal or loc.type == 'Drop') and loc.address is None and loc.locked and loc not in reachable] for loc in unreachable: loc.parent_region.locations.remove(loc) # Exception: Sell Big Poe is an event which is only reachable if Bottle with Big Poe is in the item pool. @@ -972,7 +971,6 @@ def prefill_state(base_state): for location in song_locations: location.item = None location.locked = False - location.event = False else: break diff --git a/worlds/overcooked2/__init__.py b/worlds/overcooked2/__init__.py index da0e1890894a..633b624b84a0 100644 --- a/worlds/overcooked2/__init__.py +++ b/worlds/overcooked2/__init__.py @@ -115,8 +115,6 @@ def add_level_location( region, ) - location.event = is_event - if priority: location.progress_type = LocationProgressType.PRIORITY else: diff --git a/worlds/pokemon_rb/__init__.py b/worlds/pokemon_rb/__init__.py index b44e2f3b8faa..79028a68b187 100644 --- a/worlds/pokemon_rb/__init__.py +++ b/worlds/pokemon_rb/__init__.py @@ -265,7 +265,6 @@ def stage_fill_hook(cls, multiworld, progitempool, usefulitempool, filleritempoo state = sweep_from_pool(multiworld.state, progitempool + unplaced_items) if (not item.advancement) or state.can_reach(loc, "Location", loc.player): multiworld.push_item(loc, item, False) - loc.event = item.advancement fill_locations.remove(loc) break else: diff --git a/worlds/pokemon_rb/encounters.py b/worlds/pokemon_rb/encounters.py index a426374c2e6e..6d1762b0ca71 100644 --- a/worlds/pokemon_rb/encounters.py +++ b/worlds/pokemon_rb/encounters.py @@ -197,7 +197,6 @@ def process_pokemon_locations(self): mon = randomize_pokemon(self, original_mon, mons_list, 2, self.multiworld.random) placed_mons[mon] += 1 location.item = self.create_item(mon) - location.event = True location.locked = True location.item.location = location locations.append(location) @@ -269,7 +268,6 @@ def process_pokemon_locations(self): for slot in encounter_slots: location = self.multiworld.get_location(slot.name, self.player) location.item = self.create_item(slot.original_item) - location.event = True location.locked = True location.item.location = location placed_mons[location.item.name] += 1 \ No newline at end of file diff --git a/worlds/pokemon_rb/regions.py b/worlds/pokemon_rb/regions.py index b8f3d829c69a..4932f5793583 100644 --- a/worlds/pokemon_rb/regions.py +++ b/worlds/pokemon_rb/regions.py @@ -1540,7 +1540,6 @@ def create_regions(self): item = self.create_filler() elif location.original_item == "Pokedex": if self.multiworld.randomize_pokedex[self.player] == "vanilla": - location_object.event = True event = True item = self.create_item("Pokedex") elif location.original_item == "Moon Stone" and self.multiworld.stonesanity[self.player]: diff --git a/worlds/sc2wol/Regions.py b/worlds/sc2wol/Regions.py new file mode 100644 index 000000000000..e69de29bb2d1 diff --git a/worlds/smz3/__init__.py b/worlds/smz3/__init__.py index 39aa42c07ad7..04c376f3c87d 100644 --- a/worlds/smz3/__init__.py +++ b/worlds/smz3/__init__.py @@ -527,7 +527,6 @@ def post_fill(self): if (loc.item.player == self.player and loc.always_allow(state, loc.item)): loc.item.classification = ItemClassification.filler loc.item.item.Progression = False - loc.item.location.event = False self.unreachable.append(loc) def get_filler_item_name(self) -> str: @@ -573,7 +572,6 @@ def JunkFillGT(self, factor): break assert itemFromPool is not None, "Can't find anymore item(s) to pre fill GT" self.multiworld.push_item(loc, itemFromPool, False) - loc.event = False toRemove.sort(reverse = True) for i in toRemove: self.multiworld.itempool.pop(i) diff --git a/worlds/soe/__init__.py b/worlds/soe/__init__.py index dcca722ad1fe..061322650e68 100644 --- a/worlds/soe/__init__.py +++ b/worlds/soe/__init__.py @@ -486,4 +486,3 @@ def __init__(self, player: int, name: str, address: typing.Optional[int], parent super().__init__(player, name, address, parent) # unconditional assignments favor a split dict, saving memory self.progress_type = LocationProgressType.EXCLUDED if exclude else LocationProgressType.DEFAULT - self.event = not address diff --git a/worlds/spire/__init__.py b/worlds/spire/__init__.py index 35ef94090656..d8a9322ab415 100644 --- a/worlds/spire/__init__.py +++ b/worlds/spire/__init__.py @@ -92,12 +92,6 @@ def create_region(world: MultiWorld, player: int, name: str, locations=None, exi class SpireLocation(Location): game: str = "Slay the Spire" - def __init__(self, player: int, name: str, address=None, parent=None): - super(SpireLocation, self).__init__(player, name, address, parent) - if address is None: - self.event = True - self.locked = True - class SpireItem(Item): game = "Slay the Spire" diff --git a/worlds/stardew_valley/__init__.py b/worlds/stardew_valley/__init__.py index e25fd8eb9a58..6a82a2a26dd8 100644 --- a/worlds/stardew_valley/__init__.py +++ b/worlds/stardew_valley/__init__.py @@ -30,10 +30,6 @@ class StardewLocation(Location): game: str = "Stardew Valley" - def __init__(self, player: int, name: str, address: Optional[int], parent=None): - super().__init__(player, name, address, parent) - self.event = not address - class StardewItem(Item): game: str = "Stardew Valley" @@ -144,7 +140,7 @@ def create_items(self): locations_count = len([location for location in self.multiworld.get_locations(self.player) - if not location.event]) + if location.address is not None]) created_items = create_items(self.create_item, self.delete_item, locations_count, items_to_exclude, self.options, self.random) diff --git a/worlds/stardew_valley/test/TestGeneration.py b/worlds/stardew_valley/test/TestGeneration.py index 55ad4f07544b..1b4d1476b900 100644 --- a/worlds/stardew_valley/test/TestGeneration.py +++ b/worlds/stardew_valley/test/TestGeneration.py @@ -371,8 +371,7 @@ class TestLocationGeneration(SVTestBase): def test_all_location_created_are_in_location_table(self): for location in self.get_real_locations(): - if not location.event: - self.assertIn(location.name, location_table) + self.assertIn(location.name, location_table) class TestMinLocationAndMaxItem(SVTestBase): @@ -771,11 +770,10 @@ class TestShipsanityNone(SVTestBase): } def test_no_shipsanity_locations(self): - for location in self.multiworld.get_locations(self.player): - if not location.event: - with self.subTest(location.name): - self.assertFalse("Shipsanity" in location.name) - self.assertNotIn(LocationTags.SHIPSANITY, location_table[location.name].tags) + for location in self.get_real_locations(): + with self.subTest(location.name): + self.assertFalse("Shipsanity" in location.name) + self.assertNotIn(LocationTags.SHIPSANITY, location_table[location.name].tags) class TestShipsanityCrops(SVTestBase): @@ -785,8 +783,8 @@ class TestShipsanityCrops(SVTestBase): } def test_only_crop_shipsanity_locations(self): - for location in self.multiworld.get_locations(self.player): - if not location.event and LocationTags.SHIPSANITY in location_table[location.name].tags: + for location in self.get_real_locations(): + if LocationTags.SHIPSANITY in location_table[location.name].tags: with self.subTest(location.name): self.assertIn(LocationTags.SHIPSANITY_CROP, location_table[location.name].tags) @@ -808,8 +806,8 @@ class TestShipsanityCropsExcludeIsland(SVTestBase): } def test_only_crop_shipsanity_locations(self): - for location in self.multiworld.get_locations(self.player): - if not location.event and LocationTags.SHIPSANITY in location_table[location.name].tags: + for location in self.get_real_locations(): + if LocationTags.SHIPSANITY in location_table[location.name].tags: with self.subTest(location.name): self.assertIn(LocationTags.SHIPSANITY_CROP, location_table[location.name].tags) @@ -831,8 +829,8 @@ class TestShipsanityCropsNoQiCropWithoutSpecialOrders(SVTestBase): } def test_only_crop_shipsanity_locations(self): - for location in self.multiworld.get_locations(self.player): - if not location.event and LocationTags.SHIPSANITY in location_table[location.name].tags: + for location in self.get_real_locations(): + if LocationTags.SHIPSANITY in location_table[location.name].tags: with self.subTest(location.name): self.assertIn(LocationTags.SHIPSANITY_CROP, location_table[location.name].tags) @@ -854,8 +852,8 @@ class TestShipsanityFish(SVTestBase): } def test_only_fish_shipsanity_locations(self): - for location in self.multiworld.get_locations(self.player): - if not location.event and LocationTags.SHIPSANITY in location_table[location.name].tags: + for location in self.get_real_locations(): + if LocationTags.SHIPSANITY in location_table[location.name].tags: with self.subTest(location.name): self.assertIn(LocationTags.SHIPSANITY_FISH, location_table[location.name].tags) @@ -878,8 +876,8 @@ class TestShipsanityFishExcludeIsland(SVTestBase): } def test_only_fish_shipsanity_locations(self): - for location in self.multiworld.get_locations(self.player): - if not location.event and LocationTags.SHIPSANITY in location_table[location.name].tags: + for location in self.get_real_locations(): + if LocationTags.SHIPSANITY in location_table[location.name].tags: with self.subTest(location.name): self.assertIn(LocationTags.SHIPSANITY_FISH, location_table[location.name].tags) @@ -902,8 +900,8 @@ class TestShipsanityFishExcludeQiOrders(SVTestBase): } def test_only_fish_shipsanity_locations(self): - for location in self.multiworld.get_locations(self.player): - if not location.event and LocationTags.SHIPSANITY in location_table[location.name].tags: + for location in self.get_real_locations(): + if LocationTags.SHIPSANITY in location_table[location.name].tags: with self.subTest(location.name): self.assertIn(LocationTags.SHIPSANITY_FISH, location_table[location.name].tags) @@ -926,8 +924,8 @@ class TestShipsanityFullShipment(SVTestBase): } def test_only_full_shipment_shipsanity_locations(self): - for location in self.multiworld.get_locations(self.player): - if not location.event and LocationTags.SHIPSANITY in location_table[location.name].tags: + for location in self.get_real_locations(): + if LocationTags.SHIPSANITY in location_table[location.name].tags: with self.subTest(location.name): self.assertIn(LocationTags.SHIPSANITY_FULL_SHIPMENT, location_table[location.name].tags) self.assertNotIn(LocationTags.SHIPSANITY_FISH, location_table[location.name].tags) @@ -953,8 +951,8 @@ class TestShipsanityFullShipmentExcludeIsland(SVTestBase): } def test_only_full_shipment_shipsanity_locations(self): - for location in self.multiworld.get_locations(self.player): - if not location.event and LocationTags.SHIPSANITY in location_table[location.name].tags: + for location in self.get_real_locations(): + if LocationTags.SHIPSANITY in location_table[location.name].tags: with self.subTest(location.name): self.assertIn(LocationTags.SHIPSANITY_FULL_SHIPMENT, location_table[location.name].tags) self.assertNotIn(LocationTags.SHIPSANITY_FISH, location_table[location.name].tags) @@ -979,8 +977,8 @@ class TestShipsanityFullShipmentExcludeQiBoard(SVTestBase): } def test_only_full_shipment_shipsanity_locations(self): - for location in self.multiworld.get_locations(self.player): - if not location.event and LocationTags.SHIPSANITY in location_table[location.name].tags: + for location in self.get_real_locations(): + if LocationTags.SHIPSANITY in location_table[location.name].tags: with self.subTest(location.name): self.assertIn(LocationTags.SHIPSANITY_FULL_SHIPMENT, location_table[location.name].tags) self.assertNotIn(LocationTags.SHIPSANITY_FISH, location_table[location.name].tags) @@ -1006,8 +1004,8 @@ class TestShipsanityFullShipmentWithFish(SVTestBase): } def test_only_full_shipment_and_fish_shipsanity_locations(self): - for location in self.multiworld.get_locations(self.player): - if not location.event and LocationTags.SHIPSANITY in location_table[location.name].tags: + for location in self.get_real_locations(): + if LocationTags.SHIPSANITY in location_table[location.name].tags: with self.subTest(location.name): self.assertTrue(LocationTags.SHIPSANITY_FULL_SHIPMENT in location_table[location.name].tags or LocationTags.SHIPSANITY_FISH in location_table[location.name].tags) @@ -1041,8 +1039,8 @@ class TestShipsanityFullShipmentWithFishExcludeIsland(SVTestBase): } def test_only_full_shipment_and_fish_shipsanity_locations(self): - for location in self.multiworld.get_locations(self.player): - if not location.event and LocationTags.SHIPSANITY in location_table[location.name].tags: + for location in self.get_real_locations(): + if LocationTags.SHIPSANITY in location_table[location.name].tags: with self.subTest(location.name): self.assertTrue(LocationTags.SHIPSANITY_FULL_SHIPMENT in location_table[location.name].tags or LocationTags.SHIPSANITY_FISH in location_table[location.name].tags) @@ -1075,8 +1073,8 @@ class TestShipsanityFullShipmentWithFishExcludeQiBoard(SVTestBase): } def test_only_full_shipment_and_fish_shipsanity_locations(self): - for location in self.multiworld.get_locations(self.player): - if not location.event and LocationTags.SHIPSANITY in location_table[location.name].tags: + for location in self.get_real_locations(): + if LocationTags.SHIPSANITY in location_table[location.name].tags: with self.subTest(location.name): self.assertTrue(LocationTags.SHIPSANITY_FULL_SHIPMENT in location_table[location.name].tags or LocationTags.SHIPSANITY_FISH in location_table[location.name].tags) diff --git a/worlds/stardew_valley/test/TestRules.py b/worlds/stardew_valley/test/TestRules.py index 787e0ce39c3e..3ee921bd2bc2 100644 --- a/worlds/stardew_valley/test/TestRules.py +++ b/worlds/stardew_valley/test/TestRules.py @@ -557,8 +557,8 @@ def test_cannot_make_any_donation_without_museum_access(self): railroad_item = "Railroad Boulder Removed" swap_museum_and_bathhouse(self.multiworld, self.player) collect_all_except(self.multiworld, railroad_item) - donation_locations = [location for location in self.multiworld.get_locations() if - not location.event and LocationTags.MUSEUM_DONATIONS in location_table[location.name].tags] + donation_locations = [location for location in self.get_real_locations() if + LocationTags.MUSEUM_DONATIONS in location_table[location.name].tags] for donation in donation_locations: self.assertFalse(self.world.logic.region.can_reach_location(donation.name)(self.multiworld.state)) @@ -713,10 +713,9 @@ class TestShipsanityNone(SVTestBase): } def test_no_shipsanity_locations(self): - for location in self.multiworld.get_locations(self.player): - if not location.event: - self.assertFalse("Shipsanity" in location.name) - self.assertNotIn(LocationTags.SHIPSANITY, location_table[location.name].tags) + for location in self.get_real_locations(): + self.assertFalse("Shipsanity" in location.name) + self.assertNotIn(LocationTags.SHIPSANITY, location_table[location.name].tags) class TestShipsanityCrops(SVTestBase): @@ -725,8 +724,8 @@ class TestShipsanityCrops(SVTestBase): } def test_only_crop_shipsanity_locations(self): - for location in self.multiworld.get_locations(self.player): - if not location.event and LocationTags.SHIPSANITY in location_table[location.name].tags: + for location in self.get_real_locations(): + if LocationTags.SHIPSANITY in location_table[location.name].tags: self.assertIn(LocationTags.SHIPSANITY_CROP, location_table[location.name].tags) @@ -736,8 +735,8 @@ class TestShipsanityFish(SVTestBase): } def test_only_fish_shipsanity_locations(self): - for location in self.multiworld.get_locations(self.player): - if not location.event and LocationTags.SHIPSANITY in location_table[location.name].tags: + for location in self.get_real_locations(): + if LocationTags.SHIPSANITY in location_table[location.name].tags: self.assertIn(LocationTags.SHIPSANITY_FISH, location_table[location.name].tags) @@ -747,8 +746,8 @@ class TestShipsanityFullShipment(SVTestBase): } def test_only_full_shipment_shipsanity_locations(self): - for location in self.multiworld.get_locations(self.player): - if not location.event and LocationTags.SHIPSANITY in location_table[location.name].tags: + for location in self.get_real_locations(): + if LocationTags.SHIPSANITY in location_table[location.name].tags: self.assertIn(LocationTags.SHIPSANITY_FULL_SHIPMENT, location_table[location.name].tags) self.assertNotIn(LocationTags.SHIPSANITY_FISH, location_table[location.name].tags) @@ -759,8 +758,8 @@ class TestShipsanityFullShipmentWithFish(SVTestBase): } def test_only_full_shipment_and_fish_shipsanity_locations(self): - for location in self.multiworld.get_locations(self.player): - if not location.event and LocationTags.SHIPSANITY in location_table[location.name].tags: + for location in self.get_real_locations(): + if LocationTags.SHIPSANITY in location_table[location.name].tags: self.assertTrue(LocationTags.SHIPSANITY_FULL_SHIPMENT in location_table[location.name].tags or LocationTags.SHIPSANITY_FISH in location_table[location.name].tags) @@ -774,8 +773,8 @@ class TestShipsanityEverything(SVTestBase): def test_all_shipsanity_locations_require_shipping_bin(self): bin_name = "Shipping Bin" collect_all_except(self.multiworld, bin_name) - shipsanity_locations = [location for location in self.multiworld.get_locations() if - not location.event and LocationTags.SHIPSANITY in location_table[location.name].tags] + shipsanity_locations = [location for location in self.get_real_locations() if + LocationTags.SHIPSANITY in location_table[location.name].tags] bin_item = self.world.create_item(bin_name) for location in shipsanity_locations: with self.subTest(location.name): diff --git a/worlds/stardew_valley/test/__init__.py b/worlds/stardew_valley/test/__init__.py index 5eddb7e280b0..1a463d9fc280 100644 --- a/worlds/stardew_valley/test/__init__.py +++ b/worlds/stardew_valley/test/__init__.py @@ -277,10 +277,10 @@ def collect_all_the_money(self): self.multiworld.state.collect(self.world.create_item("Stardrop"), event=False) def get_real_locations(self) -> List[Location]: - return [location for location in self.multiworld.get_locations(self.player) if not location.event] + return [location for location in self.multiworld.get_locations(self.player) if location.address is not None] def get_real_location_names(self) -> List[str]: - return [location.name for location in self.multiworld.get_locations(self.player) if not location.event] + return [location.name for location in self.get_real_locations()] pre_generated_worlds = {} diff --git a/worlds/stardew_valley/test/assertion/mod_assert.py b/worlds/stardew_valley/test/assertion/mod_assert.py index 4f72c9a3977e..eec7f805d2c5 100644 --- a/worlds/stardew_valley/test/assertion/mod_assert.py +++ b/worlds/stardew_valley/test/assertion/mod_assert.py @@ -20,7 +20,7 @@ def assert_stray_mod_items(self, chosen_mods: Union[List[str], str], multiworld: self.assertTrue(item.mod_name is None or item.mod_name in chosen_mods, f"Item {item.name} has is from mod {item.mod_name}. Allowed mods are {chosen_mods}.") for multiworld_location in multiworld.get_locations(): - if multiworld_location.event: + if multiworld_location.address is None: continue location = location_table[multiworld_location.name] self.assertTrue(location.mod_name is None or location.mod_name in chosen_mods) diff --git a/worlds/stardew_valley/test/assertion/world_assert.py b/worlds/stardew_valley/test/assertion/world_assert.py index 413517e1c912..1e5512682f92 100644 --- a/worlds/stardew_valley/test/assertion/world_assert.py +++ b/worlds/stardew_valley/test/assertion/world_assert.py @@ -13,7 +13,7 @@ def get_all_item_names(multiworld: MultiWorld) -> List[str]: def get_all_location_names(multiworld: MultiWorld) -> List[str]: - return [location.name for location in multiworld.get_locations() if not location.event] + return [location.name for location in multiworld.get_locations() if location.address is not None] class WorldAssertMixin(RuleAssertMixin, TestCase): @@ -48,7 +48,7 @@ def assert_can_win(self, multiworld: MultiWorld): self.assert_can_reach_victory(multiworld) def assert_same_number_items_locations(self, multiworld: MultiWorld): - non_event_locations = [location for location in multiworld.get_locations() if not location.event] + non_event_locations = [location for location in multiworld.get_locations() if location.address is not None] self.assertEqual(len(multiworld.itempool), len(non_event_locations)) def assert_can_reach_everything(self, multiworld: MultiWorld): diff --git a/worlds/timespinner/Regions.py b/worlds/timespinner/Regions.py index f80babc0e6d4..4f53f75eff7a 100644 --- a/worlds/timespinner/Regions.py +++ b/worlds/timespinner/Regions.py @@ -206,7 +206,6 @@ def create_location(player: int, location_data: LocationData, region: Region) -> location.access_rule = location_data.rule if id is None: - location.event = True location.locked = True return location diff --git a/worlds/tloz/__init__.py b/worlds/tloz/__init__.py index b2f23ae2ca91..d4bea783a744 100644 --- a/worlds/tloz/__init__.py +++ b/worlds/tloz/__init__.py @@ -116,7 +116,6 @@ def create_event(self, event: str): def create_location(self, name, id, parent, event=False): return_location = TLoZLocation(self.player, name, id, parent) - return_location.event = event return return_location def create_regions(self): diff --git a/worlds/undertale/Locations.py b/worlds/undertale/Locations.py index 2f7de44512fa..5b45af63a9a2 100644 --- a/worlds/undertale/Locations.py +++ b/worlds/undertale/Locations.py @@ -10,10 +10,6 @@ class AdvData(typing.NamedTuple): class UndertaleAdvancement(Location): game: str = "Undertale" - def __init__(self, player: int, name: str, address: typing.Optional[int], parent): - super().__init__(player, name, address, parent) - self.event = not address - advancement_table = { "Snowman": AdvData(79100, "Snowdin Forest"), diff --git a/worlds/wargroove/__init__.py b/worlds/wargroove/__init__.py index ab4a9364fac0..abca210b2df1 100644 --- a/worlds/wargroove/__init__.py +++ b/worlds/wargroove/__init__.py @@ -131,12 +131,6 @@ def create_region(world: MultiWorld, player: int, name: str, locations=None, exi class WargrooveLocation(Location): game: str = "Wargroove" - def __init__(self, player: int, name: str, address=None, parent=None): - super(WargrooveLocation, self).__init__(player, name, address, parent) - if address is None: - self.event = True - self.locked = True - class WargrooveItem(Item): game = "Wargroove" diff --git a/worlds/zork_grand_inquisitor/world.py b/worlds/zork_grand_inquisitor/world.py index 2dc634e47d8d..66f062631cbf 100644 --- a/worlds/zork_grand_inquisitor/world.py +++ b/worlds/zork_grand_inquisitor/world.py @@ -109,9 +109,7 @@ def create_regions(self) -> None: region_mapping[data.region], ) - location.event = isinstance(location_enum_item, ZorkGrandInquisitorEvents) - - if location.event: + if isinstance(location_enum_item, ZorkGrandInquisitorEvents): location.place_locked_item( ZorkGrandInquisitorItem( data.event_item_name, From fb1cf26118b7e977721f429b55e76a273caa939b Mon Sep 17 00:00:00 2001 From: Fabian Dill Date: Sun, 14 Apr 2024 20:40:09 +0200 Subject: [PATCH 051/153] SNIClient/LttP: modern SNI prevents payload overflow (#2523) --- SNIClient.py | 16 ++++++---------- worlds/alttp/Options.py | 5 ++--- 2 files changed, 8 insertions(+), 13 deletions(-) diff --git a/SNIClient.py b/SNIClient.py index 062d7a7cbea1..1804ab3cc08d 100644 --- a/SNIClient.py +++ b/SNIClient.py @@ -564,16 +564,12 @@ async def snes_write(ctx: SNIContext, write_list: typing.List[typing.Tuple[int, PutAddress_Request: SNESRequest = {"Opcode": "PutAddress", "Operands": [], 'Space': 'SNES'} try: for address, data in write_list: - while data: - # Divide the write into packets of 256 bytes. - PutAddress_Request['Operands'] = [hex(address)[2:], hex(min(len(data), 256))[2:]] - if ctx.snes_socket is not None: - await ctx.snes_socket.send(dumps(PutAddress_Request)) - await ctx.snes_socket.send(data[:256]) - address += 256 - data = data[256:] - else: - snes_logger.warning(f"Could not send data to SNES: {data}") + PutAddress_Request['Operands'] = [hex(address)[2:], hex(min(len(data), 256))[2:]] + if ctx.snes_socket is not None: + await ctx.snes_socket.send(dumps(PutAddress_Request)) + await ctx.snes_socket.send(data) + else: + snes_logger.warning(f"Could not send data to SNES: {data}") except ConnectionClosed: return False diff --git a/worlds/alttp/Options.py b/worlds/alttp/Options.py index 2b23dc341c43..ff960da66a49 100644 --- a/worlds/alttp/Options.py +++ b/worlds/alttp/Options.py @@ -716,9 +716,8 @@ class BeemizerTrapChance(BeemizerRange): display_name = "Beemizer Trap Chance" -class AllowCollect(Toggle): - """Allows for !collect / co-op to auto-open chests containing items for other players. - Off by default, because it currently crashes on real hardware.""" +class AllowCollect(DefaultOnToggle): + """Allows for !collect / co-op to auto-open chests containing items for other players.""" display_name = "Allow Collection of checks for other players" From 09abc5beaa5153fa9b67ce8aafcf042e096b1fdb Mon Sep 17 00:00:00 2001 From: Fabian Dill Date: Sun, 14 Apr 2024 20:49:43 +0200 Subject: [PATCH 052/153] Core: add visibility attribute to Option (#3125) --- BaseClasses.py | 6 ++++-- Options.py | 27 ++++++++++++++++++++++++++- WebHostLib/options.py | 27 ++++++++++++++++++++++----- worlds/alttp/Options.py | 7 ++++++- 4 files changed, 58 insertions(+), 9 deletions(-) diff --git a/BaseClasses.py b/BaseClasses.py index 2738d3ac6c36..cd8749e11dce 100644 --- a/BaseClasses.py +++ b/BaseClasses.py @@ -1352,11 +1352,13 @@ def get_path(state: CollectionState, region: Region) -> List[Union[Tuple[str, st def to_file(self, filename: str) -> None: from itertools import chain from worlds import AutoWorld + from Options import Visibility def write_option(option_key: str, option_obj: Options.AssembleOptions) -> None: res = getattr(self.multiworld.worlds[player].options, option_key) - display_name = getattr(option_obj, "display_name", option_key) - outfile.write(f"{display_name + ':':33}{res.current_option_name}\n") + if res.visibility & Visibility.spoiler: + display_name = getattr(option_obj, "display_name", option_key) + outfile.write(f"{display_name + ':':33}{res.current_option_name}\n") with open(filename, 'w', encoding="utf-8-sig") as outfile: outfile.write( diff --git a/Options.py b/Options.py index e1ae33914332..3b1cdc6e2b62 100644 --- a/Options.py +++ b/Options.py @@ -7,6 +7,7 @@ import numbers import random import typing +import enum from copy import deepcopy from dataclasses import dataclass @@ -20,6 +21,15 @@ import pathlib +class Visibility(enum.IntFlag): + none = 0b0000 + template = 0b0001 + simple_ui = 0b0010 # show option in simple menus, such as player-options + complex_ui = 0b0100 # show option in complex menus, such as weighted-options + spoiler = 0b1000 + all = 0b1111 + + class AssembleOptions(abc.ABCMeta): def __new__(mcs, name, bases, attrs): options = attrs["options"] = {} @@ -102,6 +112,7 @@ def meta__init__(self, *args, **kwargs): class Option(typing.Generic[T], metaclass=AssembleOptions): value: T default: typing.ClassVar[typing.Any] # something that __init__ will be able to convert to the correct type + visibility = Visibility.all # convert option_name_long into Name Long as display_name, otherwise name_long is the result. # Handled in get_option_name() @@ -1115,6 +1126,17 @@ def verify(self, world: typing.Type[World], player_name: str, plando_options: "P link.setdefault("link_replacement", None) +class Removed(FreeText): + """This Option has been Removed.""" + default = "" + visibility = Visibility.none + + def __init__(self, value: str): + if value: + raise Exception("Option removed, please update your options file.") + super().__init__(value) + + @dataclass class PerGameCommonOptions(CommonOptions): local_items: LocalItems @@ -1170,7 +1192,10 @@ def dictify_range(option: Range): for game_name, world in AutoWorldRegister.world_types.items(): if not world.hidden or generate_hidden: - all_options: typing.Dict[str, AssembleOptions] = world.options_dataclass.type_hints + all_options: typing.Dict[str, AssembleOptions] = { + option_name: option for option_name, option in world.options_dataclass.type_hints.items() + if option.visibility & Visibility.template + } with open(local_path("data", "options.yaml")) as f: file_data = f.read() diff --git a/WebHostLib/options.py b/WebHostLib/options.py index 0158de7e241f..b3fd8d612ac0 100644 --- a/WebHostLib/options.py +++ b/WebHostLib/options.py @@ -45,7 +45,15 @@ def get_html_doc(option_type: type(Options.Option)) -> str: } game_options = {} + visible: typing.Set[str] = set() + visible_weighted: typing.Set[str] = set() + for option_name, option in all_options.items(): + if option.visibility & Options.Visibility.simple_ui: + visible.add(option_name) + if option.visibility & Options.Visibility.complex_ui: + visible_weighted.add(option_name) + if option_name in handled_in_js: pass @@ -116,8 +124,6 @@ def get_html_doc(option_type: type(Options.Option)) -> str: else: logging.debug(f"{option} not exported to Web Options.") - player_options["gameOptions"] = game_options - player_options["presetOptions"] = {} for preset_name, preset in world.web.options_presets.items(): player_options["presetOptions"][preset_name] = {} @@ -156,12 +162,23 @@ def get_html_doc(option_type: type(Options.Option)) -> str: os.makedirs(os.path.join(target_folder, 'player-options'), exist_ok=True) + filtered_player_options = player_options + filtered_player_options["gameOptions"] = { + option_name: option_data for option_name, option_data in game_options.items() + if option_name in visible + } + with open(os.path.join(target_folder, 'player-options', game_name + ".json"), "w") as f: - json.dump(player_options, f, indent=2, separators=(',', ': ')) + json.dump(filtered_player_options, f, indent=2, separators=(',', ': ')) + + filtered_player_options["gameOptions"] = { + option_name: option_data for option_name, option_data in game_options.items() + if option_name in visible_weighted + } if not world.hidden and world.web.options_page is True: # Add the random option to Choice, TextChoice, and Toggle options - for option in game_options.values(): + for option in filtered_player_options["gameOptions"].values(): if option["type"] == "select": option["options"].append({"name": "Random", "value": "random"}) @@ -170,7 +187,7 @@ def get_html_doc(option_type: type(Options.Option)) -> str: weighted_options["baseOptions"]["game"][game_name] = 0 weighted_options["games"][game_name] = { - "gameSettings": game_options, + "gameSettings": filtered_player_options["gameOptions"], "gameItems": tuple(world.item_names), "gameItemGroups": [ group for group in world.item_name_groups.keys() if group != "Everything" diff --git a/worlds/alttp/Options.py b/worlds/alttp/Options.py index ff960da66a49..8cb377b7a44f 100644 --- a/worlds/alttp/Options.py +++ b/worlds/alttp/Options.py @@ -2,7 +2,7 @@ from BaseClasses import MultiWorld from Options import Choice, Range, Option, Toggle, DefaultOnToggle, DeathLink, StartInventoryPool, PlandoBosses,\ - FreeText + FreeText, Removed class GlitchesRequired(Choice): @@ -795,4 +795,9 @@ class AllowCollect(DefaultOnToggle): "music": Music, "reduceflashing": ReduceFlashing, "triforcehud": TriforceHud, + + # removed: + "goals": Removed, + "smallkey_shuffle": Removed, + "bigkey_shuffle": Removed, } From 6dbeb6c658bc42c1611fb142ab65b01b9c25bc7a Mon Sep 17 00:00:00 2001 From: Scipio Wright Date: Sun, 14 Apr 2024 22:14:16 -0400 Subject: [PATCH 053/153] TUNIC: Fix chest in incorrect region, incorrect key requirement (#3132) --- worlds/tunic/er_rules.py | 4 ++-- worlds/tunic/locations.py | 2 +- worlds/tunic/rules.py | 4 ++-- 3 files changed, 5 insertions(+), 5 deletions(-) diff --git a/worlds/tunic/er_rules.py b/worlds/tunic/er_rules.py index c6f9e242df7a..3c0b9b47d086 100644 --- a/worlds/tunic/er_rules.py +++ b/worlds/tunic/er_rules.py @@ -1434,9 +1434,9 @@ def set_er_location_rules(world: "TunicWorld", ability_unlocks: Dict[str, int]) set_rule(multiworld.get_location("Ruined Atoll - [West] Near Kevin Block", player), lambda state: state.has(laurels, player)) set_rule(multiworld.get_location("Ruined Atoll - [East] Locked Room Lower Chest", player), - lambda state: state.has_any({laurels, key}, player)) + lambda state: state.has(laurels, player) or state.has(key, player, 2)) set_rule(multiworld.get_location("Ruined Atoll - [East] Locked Room Upper Chest", player), - lambda state: state.has_any({laurels, key}, player)) + lambda state: state.has(laurels, player) or state.has(key, player, 2)) # Frog's Domain set_rule(multiworld.get_location("Frog's Domain - Side Room Grapple Secret", player), diff --git a/worlds/tunic/locations.py b/worlds/tunic/locations.py index 4d95e91cb3cc..9974e60571c2 100644 --- a/worlds/tunic/locations.py +++ b/worlds/tunic/locations.py @@ -143,7 +143,7 @@ class TunicLocationData(NamedTuple): "Overworld - [Southwest] Bombable Wall Near Fountain": TunicLocationData("Overworld", "Overworld"), "Overworld - [West] Chest After Bell": TunicLocationData("Overworld", "Overworld Belltower"), "Overworld - [Southwest] Tunnel Guarded By Turret": TunicLocationData("Overworld", "Overworld Tunnel Turret"), - "Overworld - [East] Between Ladders Near Ruined Passage": TunicLocationData("Overworld", "Above Ruined Passage"), + "Overworld - [East] Between Ladders Near Ruined Passage": TunicLocationData("Overworld", "After Ruined Passage"), "Overworld - [Northeast] Chest Above Patrol Cave": TunicLocationData("Overworld", "Upper Overworld"), "Overworld - [Southwest] Beach Chest Beneath Guard": TunicLocationData("Overworld", "Overworld Beach"), "Overworld - [Central] Chest Across From Well": TunicLocationData("Overworld", "Overworld"), diff --git a/worlds/tunic/rules.py b/worlds/tunic/rules.py index c82c5ca13339..a9e5fa0f3589 100644 --- a/worlds/tunic/rules.py +++ b/worlds/tunic/rules.py @@ -268,9 +268,9 @@ def set_location_rules(world: "TunicWorld", ability_unlocks: Dict[str, int]) -> set_rule(multiworld.get_location("Ruined Atoll - [West] Near Kevin Block", player), lambda state: state.has(laurels, player)) set_rule(multiworld.get_location("Ruined Atoll - [East] Locked Room Lower Chest", player), - lambda state: state.has_any({laurels, key}, player)) + lambda state: state.has(laurels, player) or state.has(key, player, 2)) set_rule(multiworld.get_location("Ruined Atoll - [East] Locked Room Upper Chest", player), - lambda state: state.has_any({laurels, key}, player)) + lambda state: state.has(laurels, player) or state.has(key, player, 2)) set_rule(multiworld.get_location("Librarian - Hexagon Green", player), lambda state: has_sword(state, player) or options.logic_rules) From feb62b4af240d19e48550f28a1a67ab6770e6307 Mon Sep 17 00:00:00 2001 From: Fabian Dill Date: Tue, 16 Apr 2024 02:53:12 +0200 Subject: [PATCH 054/153] Core: increment version (#3144) --- Utils.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Utils.py b/Utils.py index 10e6e504b5c2..6d4462651c89 100644 --- a/Utils.py +++ b/Utils.py @@ -46,7 +46,7 @@ def as_simple_string(self) -> str: return ".".join(str(item) for item in self) -__version__ = "0.4.5" +__version__ = "0.4.6" version_tuple = tuplize_version(__version__) is_linux = sys.platform.startswith("linux") From a1ef25455bedd4320f6dac3ddf7cb49379ae1b44 Mon Sep 17 00:00:00 2001 From: Trevor L <80716066+TRPG0@users.noreply.github.com> Date: Mon, 15 Apr 2024 18:54:35 -0600 Subject: [PATCH 055/153] Hylics 2: Fix logic for medallions in vault (#3148) --- worlds/hylics2/Rules.py | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/worlds/hylics2/Rules.py b/worlds/hylics2/Rules.py index ff9544e0e843..5fd4671958ac 100644 --- a/worlds/hylics2/Rules.py +++ b/worlds/hylics2/Rules.py @@ -413,26 +413,31 @@ def set_rules(hylics2world): lambda state: ( enter_foglast(state, player) and bridge_key(state, player) + and air_dash(state, player) )) add_rule(world.get_location("New Muldul: Vault Rear Right Medallion", player), lambda state: ( enter_foglast(state, player) and bridge_key(state, player) + and air_dash(state, player) )) add_rule(world.get_location("New Muldul: Vault Center Medallion", player), lambda state: ( enter_foglast(state, player) and bridge_key(state, player) + and air_dash(state, player) )) add_rule(world.get_location("New Muldul: Vault Front Left Medallion", player), lambda state: ( enter_foglast(state, player) and bridge_key(state, player) + and air_dash(state, player) )) add_rule(world.get_location("New Muldul: Vault Front Right Medallion", player), lambda state: ( enter_foglast(state, player) and bridge_key(state, player) + and air_dash(state, player) )) add_rule(world.get_location("Viewax's Edifice: Fort Wall Medallion", player), lambda state: paddle(state, player)) From 5da3a40964c0d8e80fd4a8dc8cdfa306f7e368ce Mon Sep 17 00:00:00 2001 From: Ziktofel Date: Tue, 16 Apr 2024 02:55:36 +0200 Subject: [PATCH 056/153] SC2 Documentation: Fix the page titles (#3074) --- worlds/sc2/docs/en_Starcraft 2.md | 2 +- worlds/sc2/docs/setup_en.md | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/worlds/sc2/docs/en_Starcraft 2.md b/worlds/sc2/docs/en_Starcraft 2.md index 43a7da89f24f..784d711319d8 100644 --- a/worlds/sc2/docs/en_Starcraft 2.md +++ b/worlds/sc2/docs/en_Starcraft 2.md @@ -1,4 +1,4 @@ -# Starcraft 2 Wings of Liberty +# Starcraft 2 ## What does randomization do to this game? diff --git a/worlds/sc2/docs/setup_en.md b/worlds/sc2/docs/setup_en.md index 10881e149c43..391d5c29c89c 100644 --- a/worlds/sc2/docs/setup_en.md +++ b/worlds/sc2/docs/setup_en.md @@ -1,4 +1,4 @@ -# StarCraft 2 Wings of Liberty Randomizer Setup Guide +# StarCraft 2 Randomizer Setup Guide This guide contains instructions on how to install and troubleshoot the StarCraft 2 Archipelago client, as well as where to obtain a config file for StarCraft 2. From 38c54ba39334edcb05d274998b4faf5add7bb542 Mon Sep 17 00:00:00 2001 From: Fabian Dill Date: Tue, 16 Apr 2024 03:26:59 +0200 Subject: [PATCH 057/153] WebHost: check: display exception chain one layer deep (#3153) * WebHost: check: display exception chain one layer deep * Update WebHostLib/check.py --- WebHostLib/check.py | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/WebHostLib/check.py b/WebHostLib/check.py index da6bfe861a6c..97cb797f7a56 100644 --- a/WebHostLib/check.py +++ b/WebHostLib/check.py @@ -108,7 +108,10 @@ def roll_options(options: Dict[str, Union[dict, str]], rolled_results[f"{filename}/{i + 1}"] = roll_settings(yaml_data, plando_options=plando_options) except Exception as e: - results[filename] = f"Failed to generate options in {filename}: {e}" + if e.__cause__: + results[filename] = f"Failed to generate options in {filename}: {e} - {e.__cause__}" + else: + results[filename] = f"Failed to generate options in {filename}: {e}" else: results[filename] = True return results, rolled_results From 30cdde8605880a76d28b682713273d1b2bd1ab27 Mon Sep 17 00:00:00 2001 From: Doug Hoskisson Date: Tue, 16 Apr 2024 14:03:30 -0700 Subject: [PATCH 058/153] CI: pyright in github actions (#3121) * CI: strict mypy check in github actions mypy_files.txt is a list of files that will fail the CI if mypy finds errors in them * don't need these * `Any` should be a way to silence the type checker * restrict return Any * CI: pyright in github actions * fix mistake in translating from mypy * missed another change from mypy to pyright * pin pyright version * add more paths that should trigger check * use Python instead of bash * type error for testing CI * Revert "type error for testing CI" This reverts commit 99f65f3dadf67fb18b6bbee90bd77d8dbd10f9f9. * oops * don't need to redirect output --- .github/pyright-config.json | 27 ++++++++++++++++++++ .github/type_check.py | 15 +++++++++++ .github/workflows/strict-type-check.yml | 33 +++++++++++++++++++++++++ ModuleUpdate.py | 2 +- typings/kivy/uix/widget.pyi | 2 +- worlds/LauncherComponents.py | 2 +- 6 files changed, 78 insertions(+), 3 deletions(-) create mode 100644 .github/pyright-config.json create mode 100644 .github/type_check.py create mode 100644 .github/workflows/strict-type-check.yml diff --git a/.github/pyright-config.json b/.github/pyright-config.json new file mode 100644 index 000000000000..6ad7fa5f19b5 --- /dev/null +++ b/.github/pyright-config.json @@ -0,0 +1,27 @@ +{ + "include": [ + "type_check.py", + "../worlds/AutoSNIClient.py", + "../Patch.py" + ], + + "exclude": [ + "**/__pycache__" + ], + + "stubPath": "../typings", + + "typeCheckingMode": "strict", + "reportImplicitOverride": "error", + "reportMissingImports": true, + "reportMissingTypeStubs": true, + + "pythonVersion": "3.8", + "pythonPlatform": "Windows", + + "executionEnvironments": [ + { + "root": ".." + } + ] +} diff --git a/.github/type_check.py b/.github/type_check.py new file mode 100644 index 000000000000..90d41722c9a5 --- /dev/null +++ b/.github/type_check.py @@ -0,0 +1,15 @@ +from pathlib import Path +import subprocess + +config = Path(__file__).parent / "pyright-config.json" + +command = ("pyright", "-p", str(config)) +print(" ".join(command)) + +try: + result = subprocess.run(command) +except FileNotFoundError as e: + print(f"{e} - Is pyright installed?") + exit(1) + +exit(result.returncode) diff --git a/.github/workflows/strict-type-check.yml b/.github/workflows/strict-type-check.yml new file mode 100644 index 000000000000..bafd572a26ae --- /dev/null +++ b/.github/workflows/strict-type-check.yml @@ -0,0 +1,33 @@ +name: type check + +on: + pull_request: + paths: + - "**.py" + - ".github/pyright-config.json" + - ".github/workflows/strict-type-check.yml" + - "**.pyi" + push: + paths: + - "**.py" + - ".github/pyright-config.json" + - ".github/workflows/strict-type-check.yml" + - "**.pyi" + +jobs: + pyright: + runs-on: ubuntu-latest + steps: + - uses: actions/checkout@v4 + + - uses: actions/setup-python@v5 + with: + python-version: "3.11" + + - name: "Install dependencies" + run: | + python -m pip install --upgrade pip pyright==1.1.358 + python ModuleUpdate.py --append "WebHostLib/requirements.txt" --force --yes + + - name: "pyright: strict check on specific files" + run: python .github/type_check.py diff --git a/ModuleUpdate.py b/ModuleUpdate.py index c3dc8c8a87b2..ed041bef4604 100644 --- a/ModuleUpdate.py +++ b/ModuleUpdate.py @@ -70,7 +70,7 @@ def install_pkg_resources(yes=False): subprocess.call([sys.executable, "-m", "pip", "install", "--upgrade", "setuptools"]) -def update(yes=False, force=False): +def update(yes: bool = False, force: bool = False) -> None: global update_ran if not update_ran: update_ran = True diff --git a/typings/kivy/uix/widget.pyi b/typings/kivy/uix/widget.pyi index 54e3b781ea01..bf736fae72fc 100644 --- a/typings/kivy/uix/widget.pyi +++ b/typings/kivy/uix/widget.pyi @@ -1,7 +1,7 @@ """ FillType_* is not a real kivy type - just something to fill unknown typing. """ from typing import Any, Optional, Protocol -from ..graphics import FillType_Drawable, FillType_Vec +from ..graphics.texture import FillType_Drawable, FillType_Vec class FillType_BindCallback(Protocol): diff --git a/worlds/LauncherComponents.py b/worlds/LauncherComponents.py index 41c0bb83295f..78ec14b4a4f5 100644 --- a/worlds/LauncherComponents.py +++ b/worlds/LauncherComponents.py @@ -64,7 +64,7 @@ class SuffixIdentifier: def __init__(self, *args: str): self.suffixes = args - def __call__(self, path: str): + def __call__(self, path: str) -> bool: if isinstance(path, str): for suffix in self.suffixes: if path.endswith(suffix): From 801d1223acbbf28318adeeccb59a30fb27cd87fb Mon Sep 17 00:00:00 2001 From: Alchav <59858495+Alchav@users.noreply.github.com> Date: Wed, 17 Apr 2024 13:22:03 -0400 Subject: [PATCH 059/153] LTTP: Thieves Town KDS key fix (#3145) --- worlds/alttp/Rules.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/worlds/alttp/Rules.py b/worlds/alttp/Rules.py index 6646aae1b93e..8eb0b3231366 100644 --- a/worlds/alttp/Rules.py +++ b/worlds/alttp/Rules.py @@ -401,7 +401,7 @@ def global_rules(world, player): set_rule(world.get_location('Thieves\' Town - Big Chest', player), lambda state: ((state._lttp_has_key('Small Key (Thieves Town)', player, 3)) or (location_item_name(state, 'Thieves\' Town - Big Chest', player) == ("Small Key (Thieves Town)", player)) and state._lttp_has_key('Small Key (Thieves Town)', player, 2)) and state.has('Hammer', player)) - if world.accessibility[player] != 'locations': + if world.accessibility[player] != 'locations' and not world.key_drop_shuffle[player]: set_always_allow(world.get_location('Thieves\' Town - Big Chest', player), lambda state, item: item.name == 'Small Key (Thieves Town)' and item.player == player) set_rule(world.get_location('Thieves\' Town - Attic', player), lambda state: state._lttp_has_key('Small Key (Thieves Town)', player, 3)) From f19a84222e59dcf5bbc791fbbe28aea4eaf06448 Mon Sep 17 00:00:00 2001 From: Alchav <59858495+Alchav@users.noreply.github.com> Date: Wed, 17 Apr 2024 13:29:32 -0400 Subject: [PATCH 060/153] ALTTP: Triforce Pieces and Condense Items fixes (#3166) --- worlds/alttp/ItemPool.py | 13 +++++++------ 1 file changed, 7 insertions(+), 6 deletions(-) diff --git a/worlds/alttp/ItemPool.py b/worlds/alttp/ItemPool.py index c26c32a7a309..ed5522990fb7 100644 --- a/worlds/alttp/ItemPool.py +++ b/worlds/alttp/ItemPool.py @@ -464,8 +464,6 @@ def cut_item(items, item_to_cut, minimum_items): while len(items) > pool_count: items_were_cut = False for reduce_item in items_reduction_table: - if len(items) <= pool_count: - break if len(reduce_item) == 2: items_were_cut = items_were_cut or cut_item(items, *reduce_item) elif len(reduce_item) == 4: @@ -477,7 +475,10 @@ def cut_item(items, item_to_cut, minimum_items): items.remove(bottle) removed_filler.append(bottle) items_were_cut = True - assert items_were_cut, f"Failed to limit item pool size for player {player}" + if items_were_cut: + break + else: + raise Exception(f"Failed to limit item pool size for player {player}") if len(items) < pool_count: items += removed_filler[len(items) - pool_count:] @@ -684,12 +685,12 @@ def place_item(loc, item): if world.triforce_pieces_mode[player].value == TriforcePiecesMode.option_extra: triforce_pieces = world.triforce_pieces_available[player].value + world.triforce_pieces_extra[player].value elif world.triforce_pieces_mode[player].value == TriforcePiecesMode.option_percentage: - percentage = float(max(100, world.triforce_pieces_percentage[player].value)) / 100 - triforce_pieces = int(round(world.triforce_pieces_required[player].value * percentage, 0)) + percentage = float(world.triforce_pieces_percentage[player].value) / 100 + triforce_pieces = round(world.triforce_pieces_required[player].value * percentage, 0) else: # available triforce_pieces = world.triforce_pieces_available[player].value - triforce_pieces = max(triforce_pieces, world.triforce_pieces_required[player].value) + triforce_pieces = min(90, max(triforce_pieces, world.triforce_pieces_required[player].value)) pieces_in_core = min(extraitems, triforce_pieces) additional_pieces_to_place = triforce_pieces - pieces_in_core From 6e56f313987286c9a6395824e2664117355053a5 Mon Sep 17 00:00:00 2001 From: Fabian Dill Date: Thu, 18 Apr 2024 18:33:16 +0200 Subject: [PATCH 061/153] LttP/Core: more ripping and tearing (#3160) --- BaseClasses.py | 45 +- Main.py | 26 +- worlds/alttp/EntranceRandomizer.py | 224 +------- worlds/alttp/EntranceShuffle.py | 17 +- worlds/alttp/ItemPool.py | 47 +- worlds/alttp/Rom.py | 66 +-- worlds/alttp/Rules.py | 514 +++++++++--------- worlds/alttp/StateHelpers.py | 12 +- worlds/alttp/UnderworldGlitchRules.py | 13 +- worlds/alttp/__init__.py | 58 +- worlds/alttp/test/__init__.py | 5 + worlds/alttp/test/dungeons/TestDungeon.py | 4 +- worlds/alttp/test/inverted/TestInverted.py | 3 +- .../test/inverted/TestInvertedBombRules.py | 2 +- .../TestInvertedMinor.py | 3 +- .../test/inverted_owg/TestInvertedOWG.py | 3 +- worlds/alttp/test/minor_glitches/TestMinor.py | 3 +- worlds/alttp/test/owg/TestVanillaOWG.py | 3 +- worlds/alttp/test/vanilla/TestVanilla.py | 3 +- 19 files changed, 385 insertions(+), 666 deletions(-) diff --git a/BaseClasses.py b/BaseClasses.py index cd8749e11dce..c98909380732 100644 --- a/BaseClasses.py +++ b/BaseClasses.py @@ -51,10 +51,6 @@ def __getattr__(self, name: str) -> Any: class MultiWorld(): debug_types = False player_name: Dict[int, str] - difficulty_requirements: dict - required_medallions: dict - dark_room_logic: Dict[int, str] - restrict_dungeon_item_on_boss: Dict[int, bool] plando_texts: List[Dict[str, str]] plando_items: List[List[Dict[str, Any]]] plando_connections: List @@ -164,49 +160,10 @@ def __init__(self, players: int): for player in range(1, players + 1): def set_player_attr(attr, val): self.__dict__.setdefault(attr, {})[player] = val - - set_player_attr('shuffle', "vanilla") - set_player_attr('logic', "noglitches") - set_player_attr('mode', 'open') - set_player_attr('difficulty', 'normal') - set_player_attr('item_functionality', 'normal') - set_player_attr('timer', False) - set_player_attr('goal', 'ganon') - set_player_attr('required_medallions', ['Ether', 'Quake']) - set_player_attr('swamp_patch_required', False) - set_player_attr('powder_patch_required', False) - set_player_attr('ganon_at_pyramid', True) - set_player_attr('ganonstower_vanilla', True) - set_player_attr('can_access_trock_eyebridge', None) - set_player_attr('can_access_trock_front', None) - set_player_attr('can_access_trock_big_chest', None) - set_player_attr('can_access_trock_middle', None) - set_player_attr('fix_fake_world', True) - set_player_attr('difficulty_requirements', None) - set_player_attr('boss_shuffle', 'none') - set_player_attr('enemy_health', 'default') - set_player_attr('enemy_damage', 'default') - set_player_attr('beemizer_total_chance', 0) - set_player_attr('beemizer_trap_chance', 0) - set_player_attr('escape_assist', []) - set_player_attr('treasure_hunt_icon', 'Triforce Piece') - set_player_attr('treasure_hunt_count', 0) - set_player_attr('clock_mode', False) - set_player_attr('countdown_start_time', 10) - set_player_attr('red_clock_time', -2) - set_player_attr('blue_clock_time', 2) - set_player_attr('green_clock_time', 4) - set_player_attr('can_take_damage', True) - set_player_attr('triforce_pieces_available', 30) - set_player_attr('triforce_pieces_required', 20) - set_player_attr('shop_shuffle', 'off') - set_player_attr('shuffle_prizes', "g") - set_player_attr('sprite_pool', []) - set_player_attr('dark_room_logic', "lamp") set_player_attr('plando_items', []) set_player_attr('plando_texts', {}) set_player_attr('plando_connections', []) - set_player_attr('game', "A Link to the Past") + set_player_attr('game', "Archipelago") set_player_attr('completion_condition', lambda state: True) self.worlds = {} self.per_slot_randoms = Utils.DeprecateDict("Using per_slot_randoms is now deprecated. Please use the " diff --git a/Main.py b/Main.py index f1d2f63692d6..50ad94de0198 100644 --- a/Main.py +++ b/Main.py @@ -36,37 +36,13 @@ def main(args, seed=None, baked_server_options: Optional[Dict[str, object]] = No logger = logging.getLogger() multiworld.set_seed(seed, args.race, str(args.outputname) if args.outputname else None) multiworld.plando_options = args.plando_options - - multiworld.shuffle = args.shuffle.copy() - multiworld.logic = args.logic.copy() - multiworld.mode = args.mode.copy() - multiworld.difficulty = args.difficulty.copy() - multiworld.item_functionality = args.item_functionality.copy() - multiworld.timer = args.timer.copy() - multiworld.goal = args.goal.copy() - multiworld.boss_shuffle = args.shufflebosses.copy() - multiworld.enemy_health = args.enemy_health.copy() - multiworld.enemy_damage = args.enemy_damage.copy() - multiworld.beemizer_total_chance = args.beemizer_total_chance.copy() - multiworld.beemizer_trap_chance = args.beemizer_trap_chance.copy() - multiworld.countdown_start_time = args.countdown_start_time.copy() - multiworld.red_clock_time = args.red_clock_time.copy() - multiworld.blue_clock_time = args.blue_clock_time.copy() - multiworld.green_clock_time = args.green_clock_time.copy() - multiworld.dungeon_counters = args.dungeon_counters.copy() - multiworld.triforce_pieces_available = args.triforce_pieces_available.copy() - multiworld.triforce_pieces_required = args.triforce_pieces_required.copy() - multiworld.shop_shuffle = args.shop_shuffle.copy() - multiworld.shuffle_prizes = args.shuffle_prizes.copy() - multiworld.sprite_pool = args.sprite_pool.copy() - multiworld.dark_room_logic = args.dark_room_logic.copy() multiworld.plando_items = args.plando_items.copy() multiworld.plando_texts = args.plando_texts.copy() multiworld.plando_connections = args.plando_connections.copy() - multiworld.required_medallions = args.required_medallions.copy() multiworld.game = args.game.copy() multiworld.player_name = args.name.copy() multiworld.sprite = args.sprite.copy() + multiworld.sprite_pool = args.sprite_pool.copy() multiworld.glitch_triforce = args.glitch_triforce # This is enabled/disabled globally, no per player option. multiworld.set_options(args) diff --git a/worlds/alttp/EntranceRandomizer.py b/worlds/alttp/EntranceRandomizer.py index 37486a9cde07..e62088c1e05c 100644 --- a/worlds/alttp/EntranceRandomizer.py +++ b/worlds/alttp/EntranceRandomizer.py @@ -23,170 +23,7 @@ def defval(value): multiargs, _ = parser.parse_known_args(argv) parser = argparse.ArgumentParser(formatter_class=ArgumentDefaultsHelpFormatter) - parser.add_argument('--logic', default=defval('no_glitches'), const='no_glitches', nargs='?', choices=['no_glitches', 'minor_glitches', 'overworld_glitches', 'hybrid_major_glitches', 'no_logic'], - help='''\ - Select Enforcement of Item Requirements. (default: %(default)s) - No Glitches: - Minor Glitches: May require Fake Flippers, Bunny Revival - and Dark Room Navigation. - Overworld Glitches: May require overworld glitches. - Hybrid Major Glitches: May require both overworld and underworld clipping. - No Logic: Distribute items without regard for - item requirements. - ''') - parser.add_argument('--glitch_triforce', help='Allow glitching to Triforce from Ganon\'s room', action='store_true') - parser.add_argument('--mode', default=defval('open'), const='open', nargs='?', choices=['standard', 'open', 'inverted'], - help='''\ - Select game mode. (default: %(default)s) - Open: World starts with Zelda rescued. - Standard: Fixes Hyrule Castle Secret Entrance and Front Door - but may lead to weird rain state issues if you exit - through the Hyrule Castle side exits before rescuing - Zelda in a full shuffle. - Inverted: Starting locations are Dark Sanctuary in West Dark - World or at Link's House, which is shuffled freely. - Requires the moon pearl to be Link in the Light World - instead of a bunny. - ''') - parser.add_argument('--goal', default=defval('ganon'), const='ganon', nargs='?', - choices=['ganon', 'pedestal', 'bosses', 'triforce_hunt', 'local_triforce_hunt', 'ganon_triforce_hunt', 'local_ganon_triforce_hunt', 'crystals', 'ganon_pedestal'], - help='''\ - Select completion goal. (default: %(default)s) - Ganon: Collect all crystals, beat Agahnim 2 then - defeat Ganon. - Crystals: Collect all crystals then defeat Ganon. - Pedestal: Places the Triforce at the Master Sword Pedestal. - Ganon Pedestal: Pull the Master Sword Pedestal, then defeat Ganon. - All Dungeons: Collect all crystals, pendants, beat both - Agahnim fights and then defeat Ganon. - Triforce Hunt: Places 30 Triforce Pieces in the world, collect - 20 of them to beat the game. - Local Triforce Hunt: Places 30 Triforce Pieces in your world, collect - 20 of them to beat the game. - Ganon Triforce Hunt: Places 30 Triforce Pieces in the world, collect - 20 of them, then defeat Ganon. - Local Ganon Triforce Hunt: Places 30 Triforce Pieces in your world, - collect 20 of them, then defeat Ganon. - ''') - parser.add_argument('--triforce_pieces_available', default=defval(30), - type=lambda value: min(max(int(value), 1), 90), - help='''Set Triforce Pieces available in item pool.''') - parser.add_argument('--triforce_pieces_required', default=defval(20), - type=lambda value: min(max(int(value), 1), 90), - help='''Set Triforce Pieces required to win a Triforce Hunt''') - parser.add_argument('--difficulty', default=defval('normal'), const='normal', nargs='?', - choices=['easy', 'normal', 'hard', 'expert'], - help='''\ - Select game difficulty. Affects available itempool. (default: %(default)s) - Easy: An easier setting with some equipment duplicated and increased health. - Normal: Normal difficulty. - Hard: A harder setting with less equipment and reduced health. - Expert: A harder yet setting with minimum equipment and health. - ''') - parser.add_argument('--item_functionality', default=defval('normal'), const='normal', nargs='?', - choices=['easy', 'normal', 'hard', 'expert'], - help='''\ - Select limits on item functionality to increase difficulty. (default: %(default)s) - Easy: Easy functionality. (Medallions usable without sword) - Normal: Normal functionality. - Hard: Reduced functionality. - Expert: Greatly reduced functionality. - ''') - parser.add_argument('--timer', default=defval('none'), const='normal', nargs='?', choices=['none', 'display', 'timed', 'timed_ohko', 'ohko', 'timed_countdown'], - help='''\ - Select game timer setting. Affects available itempool. (default: %(default)s) - None: No timer. - Display: Displays a timer but does not affect - the itempool. - Timed: Starts with clock at zero. Green Clocks - subtract 4 minutes (Total: 20), Blue Clocks - subtract 2 minutes (Total: 10), Red Clocks add - 2 minutes (Total: 10). Winner is player with - lowest time at the end. - Timed OHKO: Starts clock at 10 minutes. Green Clocks add - 5 minutes (Total: 25). As long as clock is at 0, - Link will die in one hit. - OHKO: Like Timed OHKO, but no clock items are present - and the clock is permenantly at zero. - Timed Countdown: Starts with clock at 40 minutes. Same clocks as - Timed mode. If time runs out, you lose (but can - still keep playing). - ''') - parser.add_argument('--countdown_start_time', default=defval(10), type=int, - help='''Set amount of time, in minutes, to start with in Timed Countdown and Timed OHKO modes''') - parser.add_argument('--red_clock_time', default=defval(-2), type=int, - help='''Set amount of time, in minutes, to add from picking up red clocks; negative removes time instead''') - parser.add_argument('--blue_clock_time', default=defval(2), type=int, - help='''Set amount of time, in minutes, to add from picking up blue clocks; negative removes time instead''') - parser.add_argument('--green_clock_time', default=defval(4), type=int, - help='''Set amount of time, in minutes, to add from picking up green clocks; negative removes time instead''') - parser.add_argument('--dungeon_counters', default=defval('default'), const='default', nargs='?', choices=['default', 'on', 'pickup', 'off'], - help='''\ - Select dungeon counter display settings. (default: %(default)s) - (Note, since timer takes up the same space on the hud as dungeon - counters, timer settings override dungeon counter settings.) - Default: Dungeon counters only show when the compass is - picked up, or otherwise sent, only when compass - shuffle is turned on. - On: Dungeon counters are always displayed. - Pickup: Dungeon counters are shown when the compass is - picked up, even when compass shuffle is turned - off. - Off: Dungeon counters are never shown. - ''') - parser.add_argument('--algorithm', default=defval('balanced'), const='balanced', nargs='?', - choices=['freshness', 'flood', 'vt25', 'vt26', 'balanced'], - help='''\ - Select item filling algorithm. (default: %(default)s - balanced: vt26 derivitive that aims to strike a balance between - the overworld heavy vt25 and the dungeon heavy vt26 - algorithm. - vt26: Shuffle items and place them in a random location - that it is not impossible to be in. This includes - dungeon keys and items. - vt25: Shuffle items and place them in a random location - that it is not impossible to be in. - Flood: Push out items starting from Link\'s House and - slightly biased to placing progression items with - less restrictions. - ''') - parser.add_argument('--shuffle', default=defval('vanilla'), const='vanilla', nargs='?', choices=['vanilla', 'simple', 'restricted', 'full', 'crossed', 'insanity', 'restricted_legacy', 'full_legacy', 'madness_legacy', 'insanity_legacy', 'dungeons_full', 'dungeons_simple', 'dungeons_crossed'], - help='''\ - Select Entrance Shuffling Algorithm. (default: %(default)s) - Full: Mix cave and dungeon entrances freely while limiting - multi-entrance caves to one world. - Simple: Shuffle Dungeon Entrances/Exits between each other - and keep all 4-entrance dungeons confined to one - location. All caves outside of death mountain are - shuffled in pairs and matched by original type. - Restricted: Use Dungeons shuffling from Simple but freely - connect remaining entrances. - Crossed: Mix cave and dungeon entrances freely while allowing - caves to cross between worlds. - Insanity: Decouple entrances and exits from each other and - shuffle them freely. Caves that used to be single - entrance will still exit to the same location from - which they are entered. - Vanilla: All entrances are in the same locations they were - in the base game. - Legacy shuffles preserve behavior from older versions of the - entrance randomizer including significant technical limitations. - The dungeon variants only mix up dungeons and keep the rest of - the overworld vanilla. - ''') - parser.add_argument('--open_pyramid', default=defval('auto'), help='''\ - Pre-opens the pyramid hole, this removes the Agahnim 2 requirement for it. - Depending on goal, you might still need to beat Agahnim 2 in order to beat ganon. - fast ganon goals are crystals, ganon_triforce_hunt, local_ganon_triforce_hunt, pedestalganon - auto - Only opens pyramid hole if the goal specifies a fast ganon, and entrance shuffle - is vanilla, dungeons_simple or dungeons_full. - goal - Opens pyramid hole if the goal specifies a fast ganon. - yes - Always opens the pyramid hole. - no - Never opens the pyramid hole. - ''', choices=['auto', 'goal', 'yes', 'no']) - - parser.add_argument('--loglevel', default=defval('info'), const='info', nargs='?', choices=['error', 'info', 'warning', 'debug'], help='Select level of logging for output.') parser.add_argument('--seed', help='Define seed number to generate.', type=int) parser.add_argument('--count', help='''\ Use to batch generate multiple seeds with same settings. @@ -195,16 +32,6 @@ def defval(value): --seed given will produce the same 10 (different) roms each time). ''', type=int) - - parser.add_argument('--custom', default=defval(False), help='Not supported.') - parser.add_argument('--customitemarray', default=defval(False), help='Not supported.') - # included for backwards compatibility - parser.add_argument('--shuffleganon', help=argparse.SUPPRESS, action='store_true', default=defval(True)) - parser.add_argument('--no-shuffleganon', help='''\ - If set, the Pyramid Hole and Ganon's Tower are not - included entrance shuffle pool. - ''', action='store_false', dest='shuffleganon') - parser.add_argument('--sprite', help='''\ Path to a sprite sheet to use for Link. Needs to be in binary format and have a length of 0x7000 (28672) bytes, @@ -212,35 +39,12 @@ def defval(value): Alternatively, can be a ALttP Rom patched with a Link sprite that will be extracted. ''') - - parser.add_argument('--shufflebosses', default=defval('none'), choices=['none', 'basic', 'normal', 'chaos', - "singularity"]) - - parser.add_argument('--enemy_health', default=defval('default'), - choices=['default', 'easy', 'normal', 'hard', 'expert']) - parser.add_argument('--enemy_damage', default=defval('default'), choices=['default', 'shuffled', 'chaos']) - parser.add_argument('--beemizer_total_chance', default=defval(0), type=lambda value: min(max(int(value), 0), 100)) - parser.add_argument('--beemizer_trap_chance', default=defval(0), type=lambda value: min(max(int(value), 0), 100)) - parser.add_argument('--shop_shuffle', default='', help='''\ - combine letters for options: - g: generate default inventories for light and dark world shops, and unique shops - f: generate default inventories for each shop individually - i: shuffle the default inventories of the shops around - p: randomize the prices of the items in shop inventories - u: shuffle capacity upgrades into the item pool - w: consider witch's hut like any other shop and shuffle/randomize it too - ''') - parser.add_argument('--shuffle_prizes', default=defval('g'), choices=['', 'g', 'b', 'gb']) parser.add_argument('--sprite_pool', help='''\ Specifies a colon separated list of sprites used for random/randomonevent. If not specified, the full sprite pool is used.''') - parser.add_argument('--dark_room_logic', default=('Lamp'), choices=["lamp", "torches", "none"], help='''\ - For unlit dark rooms, require the Lamp to be considered in logic by default. - Torches means additionally easily accessible Torches that can be lit with Fire Rod are considered doable. - None means full traversal through dark rooms without tools is considered doable.''') parser.add_argument('--multi', default=defval(1), type=lambda value: max(int(value), 1)) parser.add_argument('--names', default=defval('')) parser.add_argument('--outputpath') - parser.add_argument('--game', default="A Link to the Past") + parser.add_argument('--game', default="Archipelago") parser.add_argument('--race', default=defval(False), action='store_true') parser.add_argument('--outputname') if multiargs.multi: @@ -249,43 +53,21 @@ def defval(value): ret = parser.parse_args(argv) - # shuffle medallions - - ret.required_medallions = ("random", "random") # cannot be set through CLI currently ret.plando_items = [] ret.plando_texts = {} ret.plando_connections = [] - if ret.timer == "none": - ret.timer = False - if ret.dungeon_counters == 'on': - ret.dungeon_counters = True - elif ret.dungeon_counters == 'off': - ret.dungeon_counters = False - if multiargs.multi: defaults = copy.deepcopy(ret) for player in range(1, multiargs.multi + 1): playerargs = parse_arguments(shlex.split(getattr(ret, f"p{player}")), True) - for name in ['logic', 'mode', 'goal', 'difficulty', 'item_functionality', - 'shuffle', 'open_pyramid', 'timer', - 'countdown_start_time', 'red_clock_time', 'blue_clock_time', 'green_clock_time', - 'beemizer_total_chance', 'beemizer_trap_chance', - 'shufflebosses', 'enemy_health', 'enemy_damage', - 'sprite', - "triforce_pieces_available", - "triforce_pieces_required", "shop_shuffle", - "required_medallions", - "plando_items", "plando_texts", "plando_connections", - 'dungeon_counters', - 'shuffle_prizes', 'sprite_pool', 'dark_room_logic', - 'game']: + for name in ["plando_items", "plando_texts", "plando_connections", "game", "sprite", "sprite_pool"]: value = getattr(defaults, name) if getattr(playerargs, name) is None else getattr(playerargs, name) if player == 1: setattr(ret, name, {1: value}) else: getattr(ret, name)[player] = value - return ret \ No newline at end of file + return ret diff --git a/worlds/alttp/EntranceShuffle.py b/worlds/alttp/EntranceShuffle.py index 062f0588f623..87e28646a262 100644 --- a/worlds/alttp/EntranceShuffle.py +++ b/worlds/alttp/EntranceShuffle.py @@ -554,19 +554,20 @@ def connect_reachable_exit(entrance, caves, doors): # check for swamp palace fix if world.get_entrance('Dam', player).connected_region.name != 'Dam' or world.get_entrance('Swamp Palace', player).connected_region.name != 'Swamp Palace (Entrance)': - world.swamp_patch_required[player] = True + world.worlds[player].swamp_patch_required = True # check for potion shop location if world.get_entrance('Potion Shop', player).connected_region.name != 'Potion Shop': - world.powder_patch_required[player] = True + world.worlds[player].powder_patch_required = True # check for ganon location if world.get_entrance('Pyramid Hole', player).connected_region.name != 'Pyramid': - world.ganon_at_pyramid[player] = False + world.worlds[player].ganon_at_pyramid = False # check for Ganon's Tower location if world.get_entrance('Ganons Tower', player).connected_region.name != 'Ganons Tower (Entrance)': - world.ganonstower_vanilla[player] = False + world.worlds[player].ganonstower_vanilla = False + def link_inverted_entrances(world, player): # Link's house shuffled freely, Houlihan set in mandatory_connections @@ -1261,19 +1262,19 @@ def connect_reachable_exit(entrance, caves, doors): # patch swamp drain if world.get_entrance('Dam', player).connected_region.name != 'Dam' or world.get_entrance('Swamp Palace', player).connected_region.name != 'Swamp Palace (Entrance)': - world.swamp_patch_required[player] = True + world.worlds[player].swamp_patch_required = True # check for potion shop location if world.get_entrance('Potion Shop', player).connected_region.name != 'Potion Shop': - world.powder_patch_required[player] = True + world.worlds[player].powder_patch_required = True # check for ganon location if world.get_entrance('Inverted Pyramid Hole', player).connected_region.name != 'Pyramid': - world.ganon_at_pyramid[player] = False + world.worlds[player].ganon_at_pyramid = False # check for Ganon's Tower location if world.get_entrance('Inverted Ganons Tower', player).connected_region.name != 'Ganons Tower (Entrance)': - world.ganonstower_vanilla[player] = False + world.worlds[player].ganonstower_vanilla = False def connect_simple(world, exitname, regionname, player): diff --git a/worlds/alttp/ItemPool.py b/worlds/alttp/ItemPool.py index ed5522990fb7..af35d00f8878 100644 --- a/worlds/alttp/ItemPool.py +++ b/worlds/alttp/ItemPool.py @@ -238,7 +238,7 @@ def generate_itempool(world): raise NotImplementedError(f"Timer {multiworld.timer[player]} for player {player}") if multiworld.timer[player] in ['ohko', 'timed_ohko']: - multiworld.can_take_damage[player] = False + world.can_take_damage = False if multiworld.goal[player] in ['pedestal', 'triforce_hunt', 'local_triforce_hunt']: multiworld.push_item(multiworld.get_location('Ganon', player), item_factory('Nothing', world), False) else: @@ -277,12 +277,12 @@ def generate_itempool(world): # set up item pool additional_triforce_pieces = 0 if multiworld.custom: - (pool, placed_items, precollected_items, clock_mode, treasure_hunt_count, - treasure_hunt_icon) = make_custom_item_pool(multiworld, player) + pool, placed_items, precollected_items, clock_mode, treasure_hunt_count = ( + make_custom_item_pool(multiworld, player)) multiworld.rupoor_cost = min(multiworld.customitemarray[67], 9999) else: - pool, placed_items, precollected_items, clock_mode, treasure_hunt_count, \ - treasure_hunt_icon, additional_triforce_pieces = get_pool_core(multiworld, player) + pool, placed_items, precollected_items, clock_mode, treasure_hunt_count, additional_triforce_pieces = ( + get_pool_core(multiworld, player)) for item in precollected_items: multiworld.push_precollected(item_factory(item, world)) @@ -317,11 +317,11 @@ def generate_itempool(world): 'Bomb Upgrade (50)', 'Cane of Somaria', 'Cane of Byrna'] and multiworld.enemy_health[player] not in ['default', 'easy']): if multiworld.bombless_start[player] and "Bomb Upgrade" not in placed_items["Link's Uncle"]: if 'Bow' in placed_items["Link's Uncle"]: - multiworld.escape_assist[player].append('arrows') + multiworld.worlds[player].escape_assist.append('arrows') elif 'Cane' in placed_items["Link's Uncle"]: - multiworld.escape_assist[player].append('magic') + multiworld.worlds[player].escape_assist.append('magic') else: - multiworld.escape_assist[player].append('bombs') + multiworld.worlds[player].escape_assist.append('bombs') for (location, item) in placed_items.items(): multiworld.get_location(location, player).place_locked_item(item_factory(item, world)) @@ -334,13 +334,10 @@ def generate_itempool(world): item.code = 0x65 # Progressive Bow (Alt) break - if clock_mode is not None: - multiworld.clock_mode[player] = clock_mode + if clock_mode: + world.clock_mode = clock_mode - if treasure_hunt_count is not None: - multiworld.treasure_hunt_count[player] = treasure_hunt_count % 999 - if treasure_hunt_icon is not None: - multiworld.treasure_hunt_icon[player] = treasure_hunt_icon + multiworld.worlds[player].treasure_hunt_count = treasure_hunt_count % 999 dungeon_items = [item for item in get_dungeon_item_pool_player(world) if item.name not in multiworld.worlds[player].dungeon_local_item_names] @@ -369,7 +366,7 @@ def generate_itempool(world): elif "Small" in key_data[3] and multiworld.small_key_shuffle[player] == small_key_shuffle.option_universal: # key drop shuffle and universal keys are on. Add universal keys in place of key drop keys. multiworld.itempool.append(item_factory(GetBeemizerItem(multiworld, player, 'Small Key (Universal)'), world)) - dungeon_item_replacements = sum(difficulties[multiworld.difficulty[player]].extras, []) * 2 + dungeon_item_replacements = sum(difficulties[world.options.item_pool.current_key].extras, []) * 2 multiworld.random.shuffle(dungeon_item_replacements) for x in range(len(dungeon_items)-1, -1, -1): @@ -499,8 +496,8 @@ def cut_item(items, item_to_cut, minimum_items): for i in range(4): next(adv_heart_pieces).classification = ItemClassification.progression - multiworld.required_medallions[player] = (multiworld.misery_mire_medallion[player].current_key.title(), - multiworld.turtle_rock_medallion[player].current_key.title()) + world.required_medallions = (multiworld.misery_mire_medallion[player].current_key.title(), + multiworld.turtle_rock_medallion[player].current_key.title()) place_bosses(world) @@ -592,9 +589,8 @@ def get_pool_core(world, player: int): pool = [] placed_items = {} precollected_items = [] - clock_mode = None - treasure_hunt_count = None - treasure_hunt_icon = None + clock_mode: str = "" + treasure_hunt_count: int = 1 diff = difficulties[difficulty] pool.extend(diff.alwaysitems) @@ -697,7 +693,6 @@ def place_item(loc, item): pool.extend(["Triforce Piece"] * pieces_in_core) extraitems -= pieces_in_core treasure_hunt_count = world.triforce_pieces_required[player].value - treasure_hunt_icon = 'Triforce Piece' for extra in diff.extras: if extraitems >= len(extra): @@ -738,7 +733,7 @@ def place_item(loc, item): place_item(key_location, "Small Key (Universal)") pool = pool[:-3] - return (pool, placed_items, precollected_items, clock_mode, treasure_hunt_count, treasure_hunt_icon, + return (pool, placed_items, precollected_items, clock_mode, treasure_hunt_count, additional_pieces_to_place) @@ -753,9 +748,8 @@ def make_custom_item_pool(world, player): pool = [] placed_items = {} precollected_items = [] - clock_mode = None - treasure_hunt_count = None - treasure_hunt_icon = None + clock_mode: str = "" + treasure_hunt_count: int = 1 def place_item(loc, item): assert loc not in placed_items, "cannot place item twice" @@ -851,7 +845,6 @@ def place_item(loc, item): pool.extend(["Triforce Piece"] * world.triforce_pieces_available[player]) itemtotal += world.triforce_pieces_available[player] treasure_hunt_count = world.triforce_pieces_required[player] - treasure_hunt_icon = 'Triforce Piece' if timer in ['display', 'timed', 'timed_countdown']: clock_mode = 'countdown' if timer == 'timed_countdown' else 'stopwatch' @@ -896,4 +889,4 @@ def place_item(loc, item): pool.extend(['Nothing'] * (total_items_to_place - itemtotal)) logging.warning(f"Pool was filled up with {total_items_to_place - itemtotal} Nothing's for player {player}") - return (pool, placed_items, precollected_items, clock_mode, treasure_hunt_count, treasure_hunt_icon) + return (pool, placed_items, precollected_items, clock_mode, treasure_hunt_count) diff --git a/worlds/alttp/Rom.py b/worlds/alttp/Rom.py index 80f7ab7fbec9..11e2f0a37123 100644 --- a/worlds/alttp/Rom.py +++ b/worlds/alttp/Rom.py @@ -945,22 +945,22 @@ def credits_digit(num): rom.write_bytes(0x118C64, [first_bot, mid_bot, last_bot]) # patch medallion requirements - if world.required_medallions[player][0] == 'Bombos': + if local_world.required_medallions[0] == 'Bombos': rom.write_byte(0x180022, 0x00) # requirement rom.write_byte(0x4FF2, 0x31) # sprite rom.write_byte(0x50D1, 0x80) rom.write_byte(0x51B0, 0x00) - elif world.required_medallions[player][0] == 'Quake': + elif local_world.required_medallions[0] == 'Quake': rom.write_byte(0x180022, 0x02) # requirement rom.write_byte(0x4FF2, 0x31) # sprite rom.write_byte(0x50D1, 0x88) rom.write_byte(0x51B0, 0x00) - if world.required_medallions[player][1] == 'Bombos': + if local_world.required_medallions[1] == 'Bombos': rom.write_byte(0x180023, 0x00) # requirement rom.write_byte(0x5020, 0x31) # sprite rom.write_byte(0x50FF, 0x90) rom.write_byte(0x51DE, 0x00) - elif world.required_medallions[player][1] == 'Ether': + elif local_world.required_medallions[1] == 'Ether': rom.write_byte(0x180023, 0x01) # requirement rom.write_byte(0x5020, 0x31) # sprite rom.write_byte(0x50FF, 0x98) @@ -1069,7 +1069,7 @@ def credits_digit(num): # Byrna residual magic cost rom.write_bytes(0x45C42, [0x04, 0x02, 0x01]) - difficulty = world.difficulty_requirements[player] + difficulty = local_world.difficulty_requirements # Set overflow items for progressive equipment rom.write_bytes(0x180090, @@ -1240,17 +1240,17 @@ def chunk(l, n): rom.write_byte(0x180044, 0x01) # hammer activates tablets # set up clocks for timed modes - if world.clock_mode[player] in ['ohko', 'countdown-ohko']: + if local_world.clock_mode in ['ohko', 'countdown-ohko']: rom.write_bytes(0x180190, [0x01, 0x02, 0x01]) # ohko timer with resetable timer functionality - elif world.clock_mode[player] == 'stopwatch': + elif local_world.clock_mode == 'stopwatch': rom.write_bytes(0x180190, [0x02, 0x01, 0x00]) # set stopwatch mode - elif world.clock_mode[player] == 'countdown': + elif local_world.clock_mode == 'countdown': rom.write_bytes(0x180190, [0x01, 0x01, 0x00]) # set countdown, with no reset available else: rom.write_bytes(0x180190, [0x00, 0x00, 0x00]) # turn off clock mode # Set up requested clock settings - if world.clock_mode[player] in ['countdown-ohko', 'stopwatch', 'countdown']: + if local_world.clock_mode in ['countdown-ohko', 'stopwatch', 'countdown']: rom.write_int32(0x180200, world.red_clock_time[player] * 60 * 60) # red clock adjustment time (in frames, sint32) rom.write_int32(0x180204, @@ -1263,14 +1263,14 @@ def chunk(l, n): rom.write_int32(0x180208, 0) # green clock adjustment time (in frames, sint32) # Set up requested start time for countdown modes - if world.clock_mode[player] in ['countdown-ohko', 'countdown']: + if local_world.clock_mode in ['countdown-ohko', 'countdown']: rom.write_int32(0x18020C, world.countdown_start_time[player] * 60 * 60) # starting time (in frames, sint32) else: rom.write_int32(0x18020C, 0) # starting time (in frames, sint32) # set up goals for treasure hunt - rom.write_int16(0x180163, world.treasure_hunt_count[player]) - rom.write_bytes(0x180165, [0x0E, 0x28] if world.treasure_hunt_icon[player] == 'Triforce Piece' else [0x0D, 0x28]) + rom.write_int16(0x180163, local_world.treasure_hunt_count) + rom.write_bytes(0x180165, [0x0E, 0x28]) # Triforce Piece Sprite rom.write_byte(0x180194, 1) # Must turn in triforced pieces (instant win not enabled) rom.write_bytes(0x180213, [0x00, 0x01]) # Not a Tournament Seed @@ -1283,14 +1283,14 @@ def chunk(l, n): rom.write_byte(0x180211, gametype) # Game type # assorted fixes - rom.write_byte(0x1800A2, 0x01 if world.fix_fake_world[ - player] else 0x00) # Toggle whether to be in real/fake dark world when dying in a DW dungeon before killing aga1 + # Toggle whether to be in real/fake dark world when dying in a DW dungeon before killing aga1 + rom.write_byte(0x1800A2, 0x01 if local_world.fix_fake_world else 0x00) # Lock or unlock aga tower door during escape sequence. rom.write_byte(0x180169, 0x00) if world.mode[player] == 'inverted': rom.write_byte(0x180169, 0x02) # lock aga/ganon tower door with crystals in inverted rom.write_byte(0x180171, - 0x01 if world.ganon_at_pyramid[player] else 0x00) # Enable respawning on pyramid after ganon death + 0x01 if local_world.ganon_at_pyramid else 0x00) # Enable respawning on pyramid after ganon death rom.write_byte(0x180173, 0x01) # Bob is enabled rom.write_byte(0x180168, 0x08) # Spike Cave Damage rom.write_bytes(0x18016B, [0x04, 0x02, 0x01]) # Set spike cave and MM spike room Cape usage @@ -1306,7 +1306,7 @@ def chunk(l, n): rom.write_byte(0x180086, 0x00 if world.aga_randomness else 0x01) # set blue ball and ganon warp randomness rom.write_byte(0x1800A0, 0x01) # return to light world on s+q without mirror rom.write_byte(0x1800A1, 0x01) # enable overworld screen transition draining for water level inside swamp - rom.write_byte(0x180174, 0x01 if world.fix_fake_world[player] else 0x00) + rom.write_byte(0x180174, 0x01 if local_world.fix_fake_world else 0x00) rom.write_byte(0x18017E, 0x01) # Fairy fountains only trade in bottles # Starting equipment @@ -1448,7 +1448,7 @@ def chunk(l, n): for address in keys[item.name]: equip[address] = min(equip[address] + 1, 99) elif item.name in bottles: - if equip[0x34F] < world.difficulty_requirements[player].progressive_bottle_limit: + if equip[0x34F] < local_world.difficulty_requirements.progressive_bottle_limit: equip[0x35C + equip[0x34F]] = bottles[item.name] equip[0x34F] += 1 elif item.name in rupees: @@ -1507,9 +1507,9 @@ def chunk(l, n): rom.write_bytes(0x180080, [50, 50, 70, 70]) # values to fill for Capacity Upgrades (Bomb5, Bomb10, Arrow5, Arrow10) - rom.write_byte(0x18004D, ((0x01 if 'arrows' in world.escape_assist[player] else 0x00) | - (0x02 if 'bombs' in world.escape_assist[player] else 0x00) | - (0x04 if 'magic' in world.escape_assist[player] else 0x00))) # Escape assist + rom.write_byte(0x18004D, ((0x01 if 'arrows' in local_world.escape_assist else 0x00) | + (0x02 if 'bombs' in local_world.escape_assist else 0x00) | + (0x04 if 'magic' in local_world.escape_assist else 0x00))) # Escape assist if world.goal[player] in ['pedestal', 'triforce_hunt', 'local_triforce_hunt']: rom.write_byte(0x18003E, 0x01) # make ganon invincible @@ -1546,7 +1546,7 @@ def chunk(l, n): rom.write_byte(0x18003B, 0x01 if world.map_shuffle[player] else 0x00) # maps showing crystals on overworld # compasses showing dungeon count - if world.clock_mode[player] or not world.dungeon_counters[player]: + if local_world.clock_mode or not world.dungeon_counters[player]: rom.write_byte(0x18003C, 0x00) # Currently must be off if timer is on, because they use same HUD location elif world.dungeon_counters[player] is True: rom.write_byte(0x18003C, 0x02) # always on @@ -1653,13 +1653,13 @@ def get_reveal_bytes(itemName): rom.write_bytes(0x18018B, [0x20, 0, 0]) # Mantle respawn refills (magic, bombs, arrows) # patch swamp: Need to enable permanent drain of water as dam or swamp were moved - rom.write_byte(0x18003D, 0x01 if world.swamp_patch_required[player] else 0x00) + rom.write_byte(0x18003D, 0x01 if local_world.swamp_patch_required else 0x00) # powder patch: remove the need to leave the screen after powder, since it causes problems for potion shop at race game # temporarally we are just nopping out this check we will conver this to a rom fix soon. rom.write_bytes(0x02F539, - [0xEA, 0xEA, 0xEA, 0xEA, 0xEA] if world.powder_patch_required[player] else [0xAD, 0xBF, 0x0A, 0xF0, - 0x4F]) + [0xEA, 0xEA, 0xEA, 0xEA, 0xEA] if local_world.powder_patch_required else [ + 0xAD, 0xBF, 0x0A, 0xF0, 0x4F]) # allow smith into multi-entrance caves in appropriate shuffles if world.entrance_shuffle[player] in ['restricted', 'full', 'crossed', 'insanity'] or ( @@ -2421,7 +2421,7 @@ def hint_text(dest, ped_hint=False): ' %s?' % hint_text(silverarrows[0]).replace('Ganon\'s', 'my')) if silverarrows else '?\nI think not!' tt['ganon_phase_3_no_silvers'] = 'Did you find the silver arrows%s' % silverarrow_hint tt['ganon_phase_3_no_silvers_alt'] = 'Did you find the silver arrows%s' % silverarrow_hint - if world.worlds[player].has_progressive_bows and (world.difficulty_requirements[player].progressive_bow_limit >= 2 or ( + 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) @@ -2482,16 +2482,16 @@ def hint_text(dest, ped_hint=False): tt['sign_ganon'] = 'Go find the Triforce pieces with your friends... Ganon is invincible!' else: tt['sign_ganon'] = 'Go find the Triforce pieces... Ganon is invincible!' - if world.treasure_hunt_count[player] > 1: + if w.treasure_hunt_count > 1: tt['murahdahla'] = "Hello @. I\nam Murahdahla, brother of\nSahasrahla and Aginah. Behold the power of\n" \ "invisibility.\n\n\n\n… … …\n\nWait! you can see me? I knew I should have\n" \ "hidden in a hollow tree. If you bring\n%d Triforce pieces out of %d, I can reassemble it." % \ - (world.treasure_hunt_count[player], world.triforce_pieces_available[player]) + (w.treasure_hunt_count, world.triforce_pieces_available[player]) else: tt['murahdahla'] = "Hello @. I\nam Murahdahla, brother of\nSahasrahla and Aginah. Behold the power of\n" \ "invisibility.\n\n\n\n… … …\n\nWait! you can see me? I knew I should have\n" \ "hidden in a hollow tree. If you bring\n%d Triforce piece out of %d, I can reassemble it." % \ - (world.treasure_hunt_count[player], world.triforce_pieces_available[player]) + (w.treasure_hunt_count, world.triforce_pieces_available[player]) elif world.goal[player] in ['pedestal']: tt['ganon_fall_in_alt'] = 'Why are you even here?\n You can\'t even hurt me! Your goal is at the pedestal.' tt['ganon_phase_3_alt'] = 'Seriously? Go Away, I will not Die.' @@ -2500,20 +2500,20 @@ def hint_text(dest, ped_hint=False): tt['ganon_fall_in'] = Ganon1_texts[local_random.randint(0, len(Ganon1_texts) - 1)] tt['ganon_fall_in_alt'] = 'You cannot defeat me until you finish your goal!' tt['ganon_phase_3_alt'] = 'Got wax in\nyour ears?\nI can not die!' - if world.treasure_hunt_count[player] > 1: + if w.treasure_hunt_count > 1: if world.goal[player] == 'ganon_triforce_hunt' and world.players > 1: tt['sign_ganon'] = 'You need to find %d Triforce pieces out of %d with your friends to defeat Ganon.' % \ - (world.treasure_hunt_count[player], world.triforce_pieces_available[player]) + (w.treasure_hunt_count, world.triforce_pieces_available[player]) elif world.goal[player] in ['ganon_triforce_hunt', 'local_ganon_triforce_hunt']: tt['sign_ganon'] = 'You need to find %d Triforce pieces out of %d to defeat Ganon.' % \ - (world.treasure_hunt_count[player], world.triforce_pieces_available[player]) + (w.treasure_hunt_count, world.triforce_pieces_available[player]) else: if world.goal[player] == 'ganon_triforce_hunt' and world.players > 1: tt['sign_ganon'] = 'You need to find %d Triforce piece out of %d with your friends to defeat Ganon.' % \ - (world.treasure_hunt_count[player], world.triforce_pieces_available[player]) + (w.treasure_hunt_count, world.triforce_pieces_available[player]) elif world.goal[player] in ['ganon_triforce_hunt', 'local_ganon_triforce_hunt']: tt['sign_ganon'] = 'You need to find %d Triforce piece out of %d to defeat Ganon.' % \ - (world.treasure_hunt_count[player], world.triforce_pieces_available[player]) + (w.treasure_hunt_count, world.triforce_pieces_available[player]) tt['kakariko_tavern_fisherman'] = TavernMan_texts[local_random.randint(0, len(TavernMan_texts) - 1)] diff --git a/worlds/alttp/Rules.py b/worlds/alttp/Rules.py index 8eb0b3231366..9a13c2c5d02f 100644 --- a/worlds/alttp/Rules.py +++ b/worlds/alttp/Rules.py @@ -97,7 +97,7 @@ def set_rules(world): # if swamp and dam have not been moved we require mirror for swamp palace # however there is mirrorless swamp in hybrid MG, so we don't necessarily want this. HMG handles this requirement itself. - if not world.swamp_patch_required[player] and world.glitches_required[player] not in ['hybrid_major_glitches', 'no_logic']: + if not world.worlds[player].swamp_patch_required and world.glitches_required[player] not in ['hybrid_major_glitches', 'no_logic']: add_rule(world.get_entrance('Swamp Palace Moat', player), lambda state: state.has('Magic Mirror', player)) # GT Entrance may be required for Turtle Rock for OWG and < 7 required @@ -186,247 +186,249 @@ def dungeon_boss_rules(world, player): set_defeat_dungeon_boss_rule(world.get_location(location, player)) -def global_rules(world, player): +def global_rules(multiworld: MultiWorld, player: int): + world = multiworld.worlds[player] # ganon can only carry triforce - add_item_rule(world.get_location('Ganon', player), lambda item: item.name == 'Triforce' and item.player == player) + add_item_rule(multiworld.get_location('Ganon', player), lambda item: item.name == 'Triforce' and item.player == player) # dungeon prizes can only be crystals/pendants crystals_and_pendants: Set[str] = \ {item for item, item_data in item_table.items() if item_data.type == "Crystal"} prize_locations: Iterator[str] = \ (locations for locations, location_data in location_table.items() if location_data[2] == True) for prize_location in prize_locations: - add_item_rule(world.get_location(prize_location, player), + add_item_rule(multiworld.get_location(prize_location, player), lambda item: item.name in crystals_and_pendants and item.player == player) # determines which S&Q locations are available - hide from paths since it isn't an in-game location - for exit in world.get_region('Menu', player).exits: + for exit in multiworld.get_region('Menu', player).exits: exit.hide_path = True try: - old_man_sq = world.get_entrance('Old Man S&Q', player) + old_man_sq = multiworld.get_entrance('Old Man S&Q', player) except KeyError: pass # it doesn't exist, should be dungeon-only unittests else: - old_man = world.get_location("Old Man", player) + old_man = multiworld.get_location("Old Man", player) set_rule(old_man_sq, lambda state: old_man.can_reach(state)) - set_rule(world.get_location('Sunken Treasure', player), lambda state: state.has('Open Floodgate', player)) - set_rule(world.get_location('Dark Blacksmith Ruins', player), lambda state: state.has('Return Smith', player)) - set_rule(world.get_location('Purple Chest', player), + set_rule(multiworld.get_location('Sunken Treasure', player), lambda state: state.has('Open Floodgate', player)) + set_rule(multiworld.get_location('Dark Blacksmith Ruins', player), lambda state: state.has('Return Smith', player)) + set_rule(multiworld.get_location('Purple Chest', player), lambda state: state.has('Pick Up Purple Chest', player)) # Can S&Q with chest - set_rule(world.get_location('Ether Tablet', player), lambda state: can_retrieve_tablet(state, player)) - set_rule(world.get_location('Master Sword Pedestal', player), lambda state: state.has('Red Pendant', player) and state.has('Blue Pendant', player) and state.has('Green Pendant', player)) - - set_rule(world.get_location('Missing Smith', player), lambda state: state.has('Get Frog', player) and state.can_reach('Blacksmiths Hut', 'Region', player)) # Can't S&Q with smith - set_rule(world.get_location('Blacksmith', player), lambda state: state.has('Return Smith', player)) - set_rule(world.get_location('Magic Bat', player), lambda state: state.has('Magic Powder', player)) - set_rule(world.get_location('Sick Kid', player), lambda state: state.has_group("Bottles", player)) - set_rule(world.get_location('Library', player), lambda state: state.has('Pegasus Boots', player)) - - if world.enemy_shuffle[player]: - set_rule(world.get_location('Mimic Cave', player), lambda state: state.has('Hammer', player) and - can_kill_most_things(state, player, 4)) + set_rule(multiworld.get_location('Ether Tablet', player), lambda state: can_retrieve_tablet(state, player)) + set_rule(multiworld.get_location('Master Sword Pedestal', player), lambda state: state.has('Red Pendant', player) and state.has('Blue Pendant', player) and state.has('Green Pendant', player)) + + set_rule(multiworld.get_location('Missing Smith', player), lambda state: state.has('Get Frog', player) and state.can_reach('Blacksmiths Hut', 'Region', player)) # Can't S&Q with smith + set_rule(multiworld.get_location('Blacksmith', player), lambda state: state.has('Return Smith', player)) + set_rule(multiworld.get_location('Magic Bat', player), lambda state: state.has('Magic Powder', player)) + set_rule(multiworld.get_location('Sick Kid', player), lambda state: state.has_group("Bottles", player)) + set_rule(multiworld.get_location('Library', player), lambda state: state.has('Pegasus Boots', player)) + + if multiworld.enemy_shuffle[player]: + set_rule(multiworld.get_location('Mimic Cave', player), lambda state: state.has('Hammer', player) and + can_kill_most_things(state, player, 4)) else: - set_rule(world.get_location('Mimic Cave', player), lambda state: state.has('Hammer', player) - and ((state.multiworld.enemy_health[player] in ("easy", "default") and can_use_bombs(state, player, 4)) + set_rule(multiworld.get_location('Mimic Cave', player), lambda state: state.has('Hammer', player) + and ((state.multiworld.enemy_health[player] in ("easy", "default") and can_use_bombs(state, player, 4)) or can_shoot_arrows(state, player) or state.has("Cane of Somaria", player) or has_beam_sword(state, player))) - set_rule(world.get_location('Sahasrahla', player), lambda state: state.has('Green Pendant', player)) - - set_rule(world.get_location('Aginah\'s Cave', player), lambda state: can_use_bombs(state, player)) - set_rule(world.get_location('Blind\'s Hideout - Top', player), lambda state: can_use_bombs(state, player)) - set_rule(world.get_location('Chicken House', player), lambda state: can_use_bombs(state, player)) - set_rule(world.get_location('Kakariko Well - Top', player), lambda state: can_use_bombs(state, player)) - set_rule(world.get_location('Graveyard Cave', player), lambda state: can_use_bombs(state, player)) - set_rule(world.get_location('Sahasrahla\'s Hut - Left', player), lambda state: can_bomb_or_bonk(state, player)) - set_rule(world.get_location('Sahasrahla\'s Hut - Middle', player), lambda state: can_bomb_or_bonk(state, player)) - set_rule(world.get_location('Sahasrahla\'s Hut - Right', player), lambda state: can_bomb_or_bonk(state, player)) - set_rule(world.get_location('Paradox Cave Lower - Left', player), lambda state: can_use_bombs(state, player) - or has_beam_sword(state, player) or can_shoot_arrows(state, player) - or state.has_any(["Fire Rod", "Cane of Somaria"], player)) - set_rule(world.get_location('Paradox Cave Lower - Right', player), lambda state: can_use_bombs(state, player) - or has_beam_sword(state, player) or can_shoot_arrows(state, player) - or state.has_any(["Fire Rod", "Cane of Somaria"], player)) - set_rule(world.get_location('Paradox Cave Lower - Far Right', player), lambda state: can_use_bombs(state, player) - or has_beam_sword(state, player) or can_shoot_arrows(state, player) - or state.has_any(["Fire Rod", "Cane of Somaria"], player)) - set_rule(world.get_location('Paradox Cave Lower - Middle', player), lambda state: can_use_bombs(state, player) - or has_beam_sword(state, player) or can_shoot_arrows(state, player) - or state.has_any(["Fire Rod", "Cane of Somaria"], player)) - set_rule(world.get_location('Paradox Cave Lower - Far Left', player), lambda state: can_use_bombs(state, player) - or has_beam_sword(state, player) or can_shoot_arrows(state, player) - or state.has_any(["Fire Rod", "Cane of Somaria"], player)) - set_rule(world.get_location('Paradox Cave Upper - Left', player), lambda state: can_use_bombs(state, player)) - set_rule(world.get_location('Paradox Cave Upper - Right', player), lambda state: can_use_bombs(state, player)) - set_rule(world.get_location('Mini Moldorm Cave - Far Left', player), lambda state: can_kill_most_things(state, player, 4)) - set_rule(world.get_location('Mini Moldorm Cave - Left', player), lambda state: can_kill_most_things(state, player, 4)) - set_rule(world.get_location('Mini Moldorm Cave - Far Right', player), lambda state: can_kill_most_things(state, player, 4)) - set_rule(world.get_location('Mini Moldorm Cave - Right', player), lambda state: can_kill_most_things(state, player, 4)) - set_rule(world.get_location('Mini Moldorm Cave - Generous Guy', player), lambda state: can_kill_most_things(state, player, 4)) - set_rule(world.get_location('Hype Cave - Bottom', player), lambda state: can_use_bombs(state, player)) - set_rule(world.get_location('Hype Cave - Middle Left', player), lambda state: can_use_bombs(state, player)) - set_rule(world.get_location('Hype Cave - Middle Right', player), lambda state: can_use_bombs(state, player)) - set_rule(world.get_location('Hype Cave - Top', player), lambda state: can_use_bombs(state, player)) - set_rule(world.get_entrance('Light World Death Mountain Shop', player), lambda state: can_use_bombs(state, player)) - - set_rule(world.get_entrance('Two Brothers House Exit (West)', player), lambda state: can_bomb_or_bonk(state, player)) - set_rule(world.get_entrance('Two Brothers House Exit (East)', player), lambda state: can_bomb_or_bonk(state, player)) - - set_rule(world.get_location('Spike Cave', player), lambda state: + set_rule(multiworld.get_location('Sahasrahla', player), lambda state: state.has('Green Pendant', player)) + + set_rule(multiworld.get_location('Aginah\'s Cave', player), lambda state: can_use_bombs(state, player)) + set_rule(multiworld.get_location('Blind\'s Hideout - Top', player), lambda state: can_use_bombs(state, player)) + set_rule(multiworld.get_location('Chicken House', player), lambda state: can_use_bombs(state, player)) + set_rule(multiworld.get_location('Kakariko Well - Top', player), lambda state: can_use_bombs(state, player)) + set_rule(multiworld.get_location('Graveyard Cave', player), lambda state: can_use_bombs(state, player)) + set_rule(multiworld.get_location('Sahasrahla\'s Hut - Left', player), lambda state: can_bomb_or_bonk(state, player)) + set_rule(multiworld.get_location('Sahasrahla\'s Hut - Middle', player), lambda state: can_bomb_or_bonk(state, player)) + set_rule(multiworld.get_location('Sahasrahla\'s Hut - Right', player), lambda state: can_bomb_or_bonk(state, player)) + set_rule(multiworld.get_location('Paradox Cave Lower - Left', player), lambda state: can_use_bombs(state, player) + or has_beam_sword(state, player) or can_shoot_arrows(state, player) + or state.has_any(["Fire Rod", "Cane of Somaria"], player)) + set_rule(multiworld.get_location('Paradox Cave Lower - Right', player), lambda state: can_use_bombs(state, player) + or has_beam_sword(state, player) or can_shoot_arrows(state, player) + or state.has_any(["Fire Rod", "Cane of Somaria"], player)) + set_rule(multiworld.get_location('Paradox Cave Lower - Far Right', player), lambda state: can_use_bombs(state, player) + or has_beam_sword(state, player) or can_shoot_arrows(state, player) + or state.has_any(["Fire Rod", "Cane of Somaria"], player)) + set_rule(multiworld.get_location('Paradox Cave Lower - Middle', player), lambda state: can_use_bombs(state, player) + or has_beam_sword(state, player) or can_shoot_arrows(state, player) + or state.has_any(["Fire Rod", "Cane of Somaria"], player)) + set_rule(multiworld.get_location('Paradox Cave Lower - Far Left', player), lambda state: can_use_bombs(state, player) + or has_beam_sword(state, player) or can_shoot_arrows(state, player) + or state.has_any(["Fire Rod", "Cane of Somaria"], player)) + set_rule(multiworld.get_location('Paradox Cave Upper - Left', player), lambda state: can_use_bombs(state, player)) + set_rule(multiworld.get_location('Paradox Cave Upper - Right', player), lambda state: can_use_bombs(state, player)) + set_rule(multiworld.get_location('Mini Moldorm Cave - Far Left', player), lambda state: can_kill_most_things(state, player, 4)) + set_rule(multiworld.get_location('Mini Moldorm Cave - Left', player), lambda state: can_kill_most_things(state, player, 4)) + set_rule(multiworld.get_location('Mini Moldorm Cave - Far Right', player), lambda state: can_kill_most_things(state, player, 4)) + set_rule(multiworld.get_location('Mini Moldorm Cave - Right', player), lambda state: can_kill_most_things(state, player, 4)) + set_rule(multiworld.get_location('Mini Moldorm Cave - Generous Guy', player), lambda state: can_kill_most_things(state, player, 4)) + set_rule(multiworld.get_location('Hype Cave - Bottom', player), lambda state: can_use_bombs(state, player)) + set_rule(multiworld.get_location('Hype Cave - Middle Left', player), lambda state: can_use_bombs(state, player)) + set_rule(multiworld.get_location('Hype Cave - Middle Right', player), lambda state: can_use_bombs(state, player)) + set_rule(multiworld.get_location('Hype Cave - Top', player), lambda state: can_use_bombs(state, player)) + set_rule(multiworld.get_entrance('Light World Death Mountain Shop', player), lambda state: can_use_bombs(state, player)) + + set_rule(multiworld.get_entrance('Two Brothers House Exit (West)', player), lambda state: can_bomb_or_bonk(state, player)) + set_rule(multiworld.get_entrance('Two Brothers House Exit (East)', player), lambda state: can_bomb_or_bonk(state, player)) + + set_rule(multiworld.get_location('Spike Cave', player), lambda state: state.has('Hammer', player) and can_lift_rocks(state, player) and ((state.has('Cape', player) and can_extend_magic(state, player, 16, True)) or (state.has('Cane of Byrna', player) and (can_extend_magic(state, player, 12, True) or - (state.multiworld.can_take_damage[player] and (state.has('Pegasus Boots', player) or has_hearts(state, player, 4)))))) + (world.can_take_damage and (state.has('Pegasus Boots', player) or has_hearts(state, player, 4)))))) ) - set_rule(world.get_entrance('Hookshot Cave Bomb Wall (North)', player), lambda state: can_use_bombs(state, player)) - set_rule(world.get_entrance('Hookshot Cave Bomb Wall (South)', player), lambda state: can_use_bombs(state, player)) + set_rule(multiworld.get_entrance('Hookshot Cave Bomb Wall (North)', player), lambda state: can_use_bombs(state, player)) + set_rule(multiworld.get_entrance('Hookshot Cave Bomb Wall (South)', player), lambda state: can_use_bombs(state, player)) - set_rule(world.get_location('Hookshot Cave - Top Right', player), lambda state: state.has('Hookshot', player)) - set_rule(world.get_location('Hookshot Cave - Top Left', player), lambda state: state.has('Hookshot', player)) - set_rule(world.get_location('Hookshot Cave - Bottom Right', player), + set_rule(multiworld.get_location('Hookshot Cave - Top Right', player), lambda state: state.has('Hookshot', player)) + set_rule(multiworld.get_location('Hookshot Cave - Top Left', player), lambda state: state.has('Hookshot', player)) + set_rule(multiworld.get_location('Hookshot Cave - Bottom Right', player), lambda state: state.has('Hookshot', player) or state.has('Pegasus Boots', player)) - set_rule(world.get_location('Hookshot Cave - Bottom Left', player), lambda state: state.has('Hookshot', player)) + set_rule(multiworld.get_location('Hookshot Cave - Bottom Left', player), lambda state: state.has('Hookshot', player)) - set_rule(world.get_entrance('Sewers Door', player), + set_rule(multiworld.get_entrance('Sewers Door', player), lambda state: state._lttp_has_key('Small Key (Hyrule Castle)', player, 4) or ( - world.small_key_shuffle[player] == small_key_shuffle.option_universal and world.mode[ + multiworld.small_key_shuffle[player] == small_key_shuffle.option_universal and multiworld.mode[ player] == 'standard')) # standard universal small keys cannot access the shop - set_rule(world.get_entrance('Sewers Back Door', player), + set_rule(multiworld.get_entrance('Sewers Back Door', player), lambda state: state._lttp_has_key('Small Key (Hyrule Castle)', player, 4)) - set_rule(world.get_entrance('Sewers Secret Room', player), lambda state: can_bomb_or_bonk(state, player)) + set_rule(multiworld.get_entrance('Sewers Secret Room', player), lambda state: can_bomb_or_bonk(state, player)) - set_rule(world.get_entrance('Agahnim 1', player), + set_rule(multiworld.get_entrance('Agahnim 1', player), lambda state: has_sword(state, player) and state._lttp_has_key('Small Key (Agahnims Tower)', player, 4)) - set_rule(world.get_location('Castle Tower - Room 03', player), lambda state: can_kill_most_things(state, player, 4)) - set_rule(world.get_location('Castle Tower - Dark Maze', player), + set_rule(multiworld.get_location('Castle Tower - Room 03', player), lambda state: can_kill_most_things(state, player, 4)) + set_rule(multiworld.get_location('Castle Tower - Dark Maze', player), lambda state: can_kill_most_things(state, player, 4) and state._lttp_has_key('Small Key (Agahnims Tower)', player)) - set_rule(world.get_location('Castle Tower - Dark Archer Key Drop', player), + set_rule(multiworld.get_location('Castle Tower - Dark Archer Key Drop', player), lambda state: can_kill_most_things(state, player, 4) and state._lttp_has_key('Small Key (Agahnims Tower)', player, 2)) - set_rule(world.get_location('Castle Tower - Circle of Pots Key Drop', player), + set_rule(multiworld.get_location('Castle Tower - Circle of Pots Key Drop', player), lambda state: can_kill_most_things(state, player, 4) and state._lttp_has_key('Small Key (Agahnims Tower)', player, 3)) - set_always_allow(world.get_location('Eastern Palace - Big Key Chest', player), + set_always_allow(multiworld.get_location('Eastern Palace - Big Key Chest', player), lambda state, item: item.name == 'Big Key (Eastern Palace)' and item.player == player) - set_rule(world.get_location('Eastern Palace - Big Key Chest', player), + set_rule(multiworld.get_location('Eastern Palace - Big Key Chest', player), lambda state: can_kill_most_things(state, player, 5) and (state._lttp_has_key('Small Key (Eastern Palace)', player, 2) or ((location_item_name(state, 'Eastern Palace - Big Key Chest', player) == ('Big Key (Eastern Palace)', player) and state.has('Small Key (Eastern Palace)', player))))) - set_rule(world.get_location('Eastern Palace - Dark Eyegore Key Drop', player), + set_rule(multiworld.get_location('Eastern Palace - Dark Eyegore Key Drop', player), lambda state: state.has('Big Key (Eastern Palace)', player) and can_kill_most_things(state, player, 1)) - set_rule(world.get_location('Eastern Palace - Big Chest', player), + set_rule(multiworld.get_location('Eastern Palace - Big Chest', player), lambda state: state.has('Big Key (Eastern Palace)', player)) # not bothering to check for can_kill_most_things in the rooms leading to boss, as if you can kill a boss you should # be able to get through these rooms - ep_boss = world.get_location('Eastern Palace - Boss', player) + ep_boss = multiworld.get_location('Eastern Palace - Boss', player) add_rule(ep_boss, lambda state: state.has('Big Key (Eastern Palace)', player) and state._lttp_has_key('Small Key (Eastern Palace)', player, 2) and ep_boss.parent_region.dungeon.boss.can_defeat(state)) - ep_prize = world.get_location('Eastern Palace - Prize', player) + ep_prize = multiworld.get_location('Eastern Palace - Prize', player) add_rule(ep_prize, lambda state: state.has('Big Key (Eastern Palace)', player) and state._lttp_has_key('Small Key (Eastern Palace)', player, 2) and ep_prize.parent_region.dungeon.boss.can_defeat(state)) - if not world.enemy_shuffle[player]: + if not multiworld.enemy_shuffle[player]: add_rule(ep_boss, lambda state: can_shoot_arrows(state, player)) add_rule(ep_prize, lambda state: can_shoot_arrows(state, player)) # You can always kill the Stalfos' with the pots on easy/normal - if world.enemy_health[player] in ("hard", "expert") or world.enemy_shuffle[player]: + if multiworld.enemy_health[player] in ("hard", "expert") or multiworld.enemy_shuffle[player]: stalfos_rule = lambda state: can_kill_most_things(state, player, 4) for location in ['Eastern Palace - Compass Chest', 'Eastern Palace - Big Chest', 'Eastern Palace - Dark Square Pot Key', 'Eastern Palace - Dark Eyegore Key Drop', 'Eastern Palace - Big Key Chest', 'Eastern Palace - Boss', 'Eastern Palace - Prize']: - add_rule(world.get_location(location, player), stalfos_rule) + add_rule(multiworld.get_location(location, player), stalfos_rule) - set_rule(world.get_location('Desert Palace - Big Chest', player), lambda state: state.has('Big Key (Desert Palace)', player)) - set_rule(world.get_location('Desert Palace - Torch', player), lambda state: state.has('Pegasus Boots', player)) + set_rule(multiworld.get_location('Desert Palace - Big Chest', player), lambda state: state.has('Big Key (Desert Palace)', player)) + set_rule(multiworld.get_location('Desert Palace - Torch', player), lambda state: state.has('Pegasus Boots', player)) - set_rule(world.get_entrance('Desert Palace East Wing', player), lambda state: state._lttp_has_key('Small Key (Desert Palace)', player, 4)) - set_rule(world.get_location('Desert Palace - Big Key Chest', player), lambda state: can_kill_most_things(state, player, 3)) - set_rule(world.get_location('Desert Palace - Beamos Hall Pot Key', player), lambda state: state._lttp_has_key('Small Key (Desert Palace)', player, 2) and can_kill_most_things(state, player, 4)) - set_rule(world.get_location('Desert Palace - Desert Tiles 2 Pot Key', player), lambda state: state._lttp_has_key('Small Key (Desert Palace)', player, 3) and can_kill_most_things(state, player, 4)) - add_rule(world.get_location('Desert Palace - Prize', player), lambda state: state._lttp_has_key('Small Key (Desert Palace)', player, 4) and state.has('Big Key (Desert Palace)', player) and has_fire_source(state, player) and state.multiworld.get_location('Desert Palace - Prize', player).parent_region.dungeon.boss.can_defeat(state)) - add_rule(world.get_location('Desert Palace - Boss', player), lambda state: state._lttp_has_key('Small Key (Desert Palace)', player, 4) and state.has('Big Key (Desert Palace)', player) and has_fire_source(state, player) and state.multiworld.get_location('Desert Palace - Boss', player).parent_region.dungeon.boss.can_defeat(state)) + set_rule(multiworld.get_entrance('Desert Palace East Wing', player), lambda state: state._lttp_has_key('Small Key (Desert Palace)', player, 4)) + set_rule(multiworld.get_location('Desert Palace - Big Key Chest', player), lambda state: can_kill_most_things(state, player, 3)) + set_rule(multiworld.get_location('Desert Palace - Beamos Hall Pot Key', player), lambda state: state._lttp_has_key('Small Key (Desert Palace)', player, 2) and can_kill_most_things(state, player, 4)) + set_rule(multiworld.get_location('Desert Palace - Desert Tiles 2 Pot Key', player), lambda state: state._lttp_has_key('Small Key (Desert Palace)', player, 3) and can_kill_most_things(state, player, 4)) + add_rule(multiworld.get_location('Desert Palace - Prize', player), lambda state: state._lttp_has_key('Small Key (Desert Palace)', player, 4) and state.has('Big Key (Desert Palace)', player) and has_fire_source(state, player) and state.multiworld.get_location('Desert Palace - Prize', player).parent_region.dungeon.boss.can_defeat(state)) + add_rule(multiworld.get_location('Desert Palace - Boss', player), lambda state: state._lttp_has_key('Small Key (Desert Palace)', player, 4) and state.has('Big Key (Desert Palace)', player) and has_fire_source(state, player) and state.multiworld.get_location('Desert Palace - Boss', player).parent_region.dungeon.boss.can_defeat(state)) # logic patch to prevent placing a crystal in Desert that's required to reach the required keys - if not (world.small_key_shuffle[player] and world.big_key_shuffle[player]): - add_rule(world.get_location('Desert Palace - Prize', player), lambda state: state.multiworld.get_region('Desert Palace Main (Outer)', player).can_reach(state)) + if not (multiworld.small_key_shuffle[player] and multiworld.big_key_shuffle[player]): + add_rule(multiworld.get_location('Desert Palace - Prize', player), lambda state: state.multiworld.get_region('Desert Palace Main (Outer)', player).can_reach(state)) - set_rule(world.get_entrance('Tower of Hera Small Key Door', player), lambda state: state._lttp_has_key('Small Key (Tower of Hera)', player) or location_item_name(state, 'Tower of Hera - Big Key Chest', player) == ('Small Key (Tower of Hera)', player)) - set_rule(world.get_entrance('Tower of Hera Big Key Door', player), lambda state: state.has('Big Key (Tower of Hera)', player)) - if world.enemy_shuffle[player]: - add_rule(world.get_entrance('Tower of Hera Big Key Door', player), lambda state: can_kill_most_things(state, player, 3)) + set_rule(multiworld.get_entrance('Tower of Hera Small Key Door', player), lambda state: state._lttp_has_key('Small Key (Tower of Hera)', player) or location_item_name(state, 'Tower of Hera - Big Key Chest', player) == ('Small Key (Tower of Hera)', player)) + set_rule(multiworld.get_entrance('Tower of Hera Big Key Door', player), lambda state: state.has('Big Key (Tower of Hera)', player)) + if multiworld.enemy_shuffle[player]: + add_rule(multiworld.get_entrance('Tower of Hera Big Key Door', player), lambda state: can_kill_most_things(state, player, 3)) else: - add_rule(world.get_entrance('Tower of Hera Big Key Door', player), + add_rule(multiworld.get_entrance('Tower of Hera Big Key Door', player), lambda state: (has_melee_weapon(state, player) or (state.has('Silver Bow', player) and can_shoot_arrows(state, player)) or state.has("Cane of Byrna", player) or state.has("Cane of Somaria", player))) - set_rule(world.get_location('Tower of Hera - Big Chest', player), lambda state: state.has('Big Key (Tower of Hera)', player)) - set_rule(world.get_location('Tower of Hera - Big Key Chest', player), lambda state: has_fire_source(state, player)) - if world.accessibility[player] != 'locations': - set_always_allow(world.get_location('Tower of Hera - Big Key Chest', player), lambda state, item: item.name == 'Small Key (Tower of Hera)' and item.player == player) - - set_rule(world.get_entrance('Swamp Palace Moat', player), lambda state: state.has('Flippers', player) and state.has('Open Floodgate', player)) - set_rule(world.get_entrance('Swamp Palace Small Key Door', player), lambda state: state._lttp_has_key('Small Key (Swamp Palace)', player)) - set_rule(world.get_location('Swamp Palace - Map Chest', player), lambda state: can_use_bombs(state, player)) - set_rule(world.get_location('Swamp Palace - Trench 1 Pot Key', player), lambda state: state._lttp_has_key('Small Key (Swamp Palace)', player, 2)) - set_rule(world.get_entrance('Swamp Palace (Center)', player), lambda state: state.has('Hammer', player) and state._lttp_has_key('Small Key (Swamp Palace)', player, 3)) - set_rule(world.get_location('Swamp Palace - Hookshot Pot Key', player), lambda state: state.has('Hookshot', player)) - if world.pot_shuffle[player]: + set_rule(multiworld.get_location('Tower of Hera - Big Chest', player), lambda state: state.has('Big Key (Tower of Hera)', player)) + set_rule(multiworld.get_location('Tower of Hera - Big Key Chest', player), lambda state: has_fire_source(state, player)) + if multiworld.accessibility[player] != 'locations': + set_always_allow(multiworld.get_location('Tower of Hera - Big Key Chest', player), lambda state, item: item.name == 'Small Key (Tower of Hera)' and item.player == player) + + set_rule(multiworld.get_entrance('Swamp Palace Moat', player), lambda state: state.has('Flippers', player) and state.has('Open Floodgate', player)) + set_rule(multiworld.get_entrance('Swamp Palace Small Key Door', player), lambda state: state._lttp_has_key('Small Key (Swamp Palace)', player)) + set_rule(multiworld.get_location('Swamp Palace - Map Chest', player), lambda state: can_use_bombs(state, player)) + set_rule(multiworld.get_location('Swamp Palace - Trench 1 Pot Key', player), lambda state: state._lttp_has_key('Small Key (Swamp Palace)', player, 2)) + set_rule(multiworld.get_entrance('Swamp Palace (Center)', player), lambda state: state.has('Hammer', player) and state._lttp_has_key('Small Key (Swamp Palace)', player, 3)) + set_rule(multiworld.get_location('Swamp Palace - Hookshot Pot Key', player), lambda state: state.has('Hookshot', player)) + if multiworld.pot_shuffle[player]: # it could move the key to the top right platform which can only be reached with bombs - add_rule(world.get_location('Swamp Palace - Hookshot Pot Key', player), lambda state: can_use_bombs(state, player)) - set_rule(world.get_entrance('Swamp Palace (West)', player), lambda state: state._lttp_has_key('Small Key (Swamp Palace)', player, 6) + add_rule(multiworld.get_location('Swamp Palace - Hookshot Pot Key', player), lambda state: can_use_bombs(state, player)) + set_rule(multiworld.get_entrance('Swamp Palace (West)', player), lambda state: state._lttp_has_key('Small Key (Swamp Palace)', player, 6) if state.has('Hookshot', player) else state._lttp_has_key('Small Key (Swamp Palace)', player, 4)) - set_rule(world.get_location('Swamp Palace - Big Chest', player), lambda state: state.has('Big Key (Swamp Palace)', player)) - if world.accessibility[player] != 'locations': - allow_self_locking_items(world.get_location('Swamp Palace - Big Chest', player), 'Big Key (Swamp Palace)') - set_rule(world.get_entrance('Swamp Palace (North)', player), lambda state: state.has('Hookshot', player) and state._lttp_has_key('Small Key (Swamp Palace)', player, 5)) - if not world.small_key_shuffle[player] and world.glitches_required[player] not in ['hybrid_major_glitches', 'no_logic']: - forbid_item(world.get_location('Swamp Palace - Entrance', player), 'Big Key (Swamp Palace)', player) - set_rule(world.get_location('Swamp Palace - Prize', player), lambda state: state._lttp_has_key('Small Key (Swamp Palace)', player, 6)) - set_rule(world.get_location('Swamp Palace - Boss', player), lambda state: state._lttp_has_key('Small Key (Swamp Palace)', player, 6)) - if world.pot_shuffle[player]: + set_rule(multiworld.get_location('Swamp Palace - Big Chest', player), lambda state: state.has('Big Key (Swamp Palace)', player)) + if multiworld.accessibility[player] != 'locations': + allow_self_locking_items(multiworld.get_location('Swamp Palace - Big Chest', player), 'Big Key (Swamp Palace)') + set_rule(multiworld.get_entrance('Swamp Palace (North)', player), lambda state: state.has('Hookshot', player) and state._lttp_has_key('Small Key (Swamp Palace)', player, 5)) + if not multiworld.small_key_shuffle[player] and multiworld.glitches_required[player] not in ['hybrid_major_glitches', 'no_logic']: + forbid_item(multiworld.get_location('Swamp Palace - Entrance', player), 'Big Key (Swamp Palace)', player) + set_rule(multiworld.get_location('Swamp Palace - Prize', player), lambda state: state._lttp_has_key('Small Key (Swamp Palace)', player, 6)) + set_rule(multiworld.get_location('Swamp Palace - Boss', player), lambda state: state._lttp_has_key('Small Key (Swamp Palace)', player, 6)) + if multiworld.pot_shuffle[player]: # key can (and probably will) be moved behind bombable wall - set_rule(world.get_location('Swamp Palace - Waterway Pot Key', player), lambda state: can_use_bombs(state, player)) + set_rule(multiworld.get_location('Swamp Palace - Waterway Pot Key', player), lambda state: can_use_bombs(state, player)) - set_rule(world.get_entrance('Thieves Town Big Key Door', player), lambda state: state.has('Big Key (Thieves Town)', player)) + set_rule(multiworld.get_entrance('Thieves Town Big Key Door', player), lambda state: state.has('Big Key (Thieves Town)', player)) - if world.worlds[player].dungeons["Thieves Town"].boss.enemizer_name == "Blind": - set_rule(world.get_entrance('Blind Fight', player), lambda state: state._lttp_has_key('Small Key (Thieves Town)', player, 3) and can_use_bombs(state, player)) + if multiworld.worlds[player].dungeons["Thieves Town"].boss.enemizer_name == "Blind": + set_rule(multiworld.get_entrance('Blind Fight', player), lambda state: state._lttp_has_key('Small Key (Thieves Town)', player, 3) and can_use_bombs(state, player)) - set_rule(world.get_location('Thieves\' Town - Big Chest', player), + set_rule(multiworld.get_location('Thieves\' Town - Big Chest', player), lambda state: ((state._lttp_has_key('Small Key (Thieves Town)', player, 3)) or (location_item_name(state, 'Thieves\' Town - Big Chest', player) == ("Small Key (Thieves Town)", player)) and state._lttp_has_key('Small Key (Thieves Town)', player, 2)) and state.has('Hammer', player)) - if world.accessibility[player] != 'locations' and not world.key_drop_shuffle[player]: - set_always_allow(world.get_location('Thieves\' Town - Big Chest', player), lambda state, item: item.name == 'Small Key (Thieves Town)' and item.player == player) - set_rule(world.get_location('Thieves\' Town - Attic', player), lambda state: state._lttp_has_key('Small Key (Thieves Town)', player, 3)) - set_rule(world.get_location('Thieves\' Town - Spike Switch Pot Key', player), + if multiworld.accessibility[player] != 'locations' and not multiworld.key_drop_shuffle[player]: + set_always_allow(multiworld.get_location('Thieves\' Town - Big Chest', player), lambda state, item: item.name == 'Small Key (Thieves Town)' and item.player == player) + + set_rule(multiworld.get_location('Thieves\' Town - Attic', player), lambda state: state._lttp_has_key('Small Key (Thieves Town)', player, 3)) + set_rule(multiworld.get_location('Thieves\' Town - Spike Switch Pot Key', player), lambda state: state._lttp_has_key('Small Key (Thieves Town)', player)) # We need so many keys in the SW doors because they are all reachable as the last door (except for the door to mothula) - set_rule(world.get_entrance('Skull Woods First Section South Door', player), lambda state: state._lttp_has_key('Small Key (Skull Woods)', player, 5)) - set_rule(world.get_entrance('Skull Woods First Section (Right) North Door', player), lambda state: state._lttp_has_key('Small Key (Skull Woods)', player, 5)) - set_rule(world.get_entrance('Skull Woods First Section West Door', player), lambda state: state._lttp_has_key('Small Key (Skull Woods)', player, 5)) - set_rule(world.get_entrance('Skull Woods First Section (Left) Door to Exit', player), lambda state: state._lttp_has_key('Small Key (Skull Woods)', player, 5)) - set_rule(world.get_location('Skull Woods - Big Chest', player), lambda state: state.has('Big Key (Skull Woods)', player) and can_use_bombs(state, player)) - if world.accessibility[player] != 'locations': - allow_self_locking_items(world.get_location('Skull Woods - Big Chest', player), 'Big Key (Skull Woods)') - set_rule(world.get_entrance('Skull Woods Torch Room', player), lambda state: state._lttp_has_key('Small Key (Skull Woods)', player, 4) and state.has('Fire Rod', player) and has_sword(state, player)) # sword required for curtain - add_rule(world.get_location('Skull Woods - Prize', player), lambda state: state._lttp_has_key('Small Key (Skull Woods)', player, 5)) - add_rule(world.get_location('Skull Woods - Boss', player), lambda state: state._lttp_has_key('Small Key (Skull Woods)', player, 5)) - - set_rule(world.get_location('Ice Palace - Jelly Key Drop', player), lambda state: can_melt_things(state, player)) - set_rule(world.get_location('Ice Palace - Compass Chest', player), lambda state: can_melt_things(state, player) and state._lttp_has_key('Small Key (Ice Palace)', player)) - set_rule(world.get_entrance('Ice Palace (Second Section)', player), lambda state: can_melt_things(state, player) and state._lttp_has_key('Small Key (Ice Palace)', player) and can_use_bombs(state, player)) - - set_rule(world.get_entrance('Ice Palace (Main)', player), lambda state: state._lttp_has_key('Small Key (Ice Palace)', player, 2)) - set_rule(world.get_location('Ice Palace - Big Chest', player), lambda state: state.has('Big Key (Ice Palace)', player)) - set_rule(world.get_entrance('Ice Palace (Kholdstare)', player), lambda state: can_lift_rocks(state, player) and state.has('Hammer', player) and state.has('Big Key (Ice Palace)', player) and (state._lttp_has_key('Small Key (Ice Palace)', player, 6) or (state.has('Cane of Somaria', player) and state._lttp_has_key('Small Key (Ice Palace)', player, 5)))) + set_rule(multiworld.get_entrance('Skull Woods First Section South Door', player), lambda state: state._lttp_has_key('Small Key (Skull Woods)', player, 5)) + set_rule(multiworld.get_entrance('Skull Woods First Section (Right) North Door', player), lambda state: state._lttp_has_key('Small Key (Skull Woods)', player, 5)) + set_rule(multiworld.get_entrance('Skull Woods First Section West Door', player), lambda state: state._lttp_has_key('Small Key (Skull Woods)', player, 5)) + set_rule(multiworld.get_entrance('Skull Woods First Section (Left) Door to Exit', player), lambda state: state._lttp_has_key('Small Key (Skull Woods)', player, 5)) + set_rule(multiworld.get_location('Skull Woods - Big Chest', player), lambda state: state.has('Big Key (Skull Woods)', player) and can_use_bombs(state, player)) + if multiworld.accessibility[player] != 'locations': + allow_self_locking_items(multiworld.get_location('Skull Woods - Big Chest', player), 'Big Key (Skull Woods)') + set_rule(multiworld.get_entrance('Skull Woods Torch Room', player), lambda state: state._lttp_has_key('Small Key (Skull Woods)', player, 4) and state.has('Fire Rod', player) and has_sword(state, player)) # sword required for curtain + add_rule(multiworld.get_location('Skull Woods - Prize', player), lambda state: state._lttp_has_key('Small Key (Skull Woods)', player, 5)) + add_rule(multiworld.get_location('Skull Woods - Boss', player), lambda state: state._lttp_has_key('Small Key (Skull Woods)', player, 5)) + + set_rule(multiworld.get_location('Ice Palace - Jelly Key Drop', player), lambda state: can_melt_things(state, player)) + set_rule(multiworld.get_location('Ice Palace - Compass Chest', player), lambda state: can_melt_things(state, player) and state._lttp_has_key('Small Key (Ice Palace)', player)) + set_rule(multiworld.get_entrance('Ice Palace (Second Section)', player), lambda state: can_melt_things(state, player) and state._lttp_has_key('Small Key (Ice Palace)', player) and can_use_bombs(state, player)) + + set_rule(multiworld.get_entrance('Ice Palace (Main)', player), lambda state: state._lttp_has_key('Small Key (Ice Palace)', player, 2)) + set_rule(multiworld.get_location('Ice Palace - Big Chest', player), lambda state: state.has('Big Key (Ice Palace)', player)) + set_rule(multiworld.get_entrance('Ice Palace (Kholdstare)', player), lambda state: can_lift_rocks(state, player) and state.has('Hammer', player) and state.has('Big Key (Ice Palace)', player) and (state._lttp_has_key('Small Key (Ice Palace)', player, 6) or (state.has('Cane of Somaria', player) and state._lttp_has_key('Small Key (Ice Palace)', player, 5)))) # This is a complicated rule, so let's break it down. # Hookshot always suffices to get to the right side. # Also, once you get over there, you have to cross the spikes, so that's the last line. @@ -436,102 +438,102 @@ def global_rules(world, player): # Hence if big key is available then it's 6 keys, otherwise 4 keys. # If key_drop is off, then we have 3 drop keys available, and can never satisfy the 6 key requirement because one key is on right side, # so this reduces perfectly to original logic. - set_rule(world.get_entrance('Ice Palace (East)', player), lambda state: (state.has('Hookshot', player) or - (state._lttp_has_key('Small Key (Ice Palace)', player, 4) + set_rule(multiworld.get_entrance('Ice Palace (East)', player), lambda state: (state.has('Hookshot', player) or + (state._lttp_has_key('Small Key (Ice Palace)', player, 4) if item_name_in_location_names(state, 'Big Key (Ice Palace)', player, [('Ice Palace - Spike Room', player), ('Ice Palace - Hammer Block Key Drop', player), ('Ice Palace - Big Key Chest', player), ('Ice Palace - Map Chest', player)]) - else state._lttp_has_key('Small Key (Ice Palace)', player, 6))) and - (state.multiworld.can_take_damage[player] or state.has('Hookshot', player) or state.has('Cape', player) or state.has('Cane of Byrna', player))) - set_rule(world.get_entrance('Ice Palace (East Top)', player), lambda state: can_lift_rocks(state, player) and state.has('Hammer', player)) + else state._lttp_has_key('Small Key (Ice Palace)', player, 6))) and ( + world.can_take_damage or state.has('Hookshot', player) or state.has('Cape', player) or state.has('Cane of Byrna', player))) + set_rule(multiworld.get_entrance('Ice Palace (East Top)', player), lambda state: can_lift_rocks(state, player) and state.has('Hammer', player)) - set_rule(world.get_entrance('Misery Mire Entrance Gap', player), lambda state: (state.has('Pegasus Boots', player) or state.has('Hookshot', player)) and (has_sword(state, player) or state.has('Fire Rod', player) or state.has('Ice Rod', player) or state.has('Hammer', player) or state.has('Cane of Somaria', player) or can_shoot_arrows(state, player))) # need to defeat wizzrobes, bombs don't work ... - set_rule(world.get_location('Misery Mire - Fishbone Pot Key', player), lambda state: state.has('Big Key (Misery Mire)', player) or state._lttp_has_key('Small Key (Misery Mire)', player, 4)) + set_rule(multiworld.get_entrance('Misery Mire Entrance Gap', player), lambda state: (state.has('Pegasus Boots', player) or state.has('Hookshot', player)) and (has_sword(state, player) or state.has('Fire Rod', player) or state.has('Ice Rod', player) or state.has('Hammer', player) or state.has('Cane of Somaria', player) or can_shoot_arrows(state, player))) # need to defeat wizzrobes, bombs don't work ... + set_rule(multiworld.get_location('Misery Mire - Fishbone Pot Key', player), lambda state: state.has('Big Key (Misery Mire)', player) or state._lttp_has_key('Small Key (Misery Mire)', player, 4)) - set_rule(world.get_location('Misery Mire - Big Chest', player), lambda state: state.has('Big Key (Misery Mire)', player)) - set_rule(world.get_location('Misery Mire - Spike Chest', player), lambda state: (state.multiworld.can_take_damage[player] and has_hearts(state, player, 4)) or state.has('Cane of Byrna', player) or state.has('Cape', player)) - set_rule(world.get_entrance('Misery Mire Big Key Door', player), lambda state: state.has('Big Key (Misery Mire)', player)) + set_rule(multiworld.get_location('Misery Mire - Big Chest', player), lambda state: state.has('Big Key (Misery Mire)', player)) + set_rule(multiworld.get_location('Misery Mire - Spike Chest', player), lambda state: (world.can_take_damage and has_hearts(state, player, 4)) or state.has('Cane of Byrna', player) or state.has('Cape', player)) + set_rule(multiworld.get_entrance('Misery Mire Big Key Door', player), lambda state: state.has('Big Key (Misery Mire)', player)) # How to access crystal switch: # If have big key: then you will need 2 small keys to be able to hit switch and return to main area, as you can burn key in dark room # If not big key: cannot burn key in dark room, hence need only 1 key. all doors immediately available lead to a crystal switch. # The listed chests are those which can be reached if you can reach a crystal switch. - set_rule(world.get_location('Misery Mire - Map Chest', player), lambda state: state._lttp_has_key('Small Key (Misery Mire)', player, 2)) - set_rule(world.get_location('Misery Mire - Main Lobby', player), lambda state: state._lttp_has_key('Small Key (Misery Mire)', player, 2)) + set_rule(multiworld.get_location('Misery Mire - Map Chest', player), lambda state: state._lttp_has_key('Small Key (Misery Mire)', player, 2)) + set_rule(multiworld.get_location('Misery Mire - Main Lobby', player), lambda state: state._lttp_has_key('Small Key (Misery Mire)', player, 2)) # we can place a small key in the West wing iff it also contains/blocks the Big Key, as we cannot reach and softlock with the basement key door yet - set_rule(world.get_location('Misery Mire - Conveyor Crystal Key Drop', player), + set_rule(multiworld.get_location('Misery Mire - Conveyor Crystal Key Drop', player), lambda state: state._lttp_has_key('Small Key (Misery Mire)', player, 4) if location_item_name(state, 'Misery Mire - Compass Chest', player) == ('Big Key (Misery Mire)', player) or location_item_name(state, 'Misery Mire - Big Key Chest', player) == ('Big Key (Misery Mire)', player) or location_item_name(state, 'Misery Mire - Conveyor Crystal Key Drop', player) == ('Big Key (Misery Mire)', player) else state._lttp_has_key('Small Key (Misery Mire)', player, 5)) - set_rule(world.get_entrance('Misery Mire (West)', player), lambda state: state._lttp_has_key('Small Key (Misery Mire)', player, 5) + set_rule(multiworld.get_entrance('Misery Mire (West)', player), lambda state: state._lttp_has_key('Small Key (Misery Mire)', player, 5) if ((location_item_name(state, 'Misery Mire - Compass Chest', player) in [('Big Key (Misery Mire)', player)]) or (location_item_name(state, 'Misery Mire - Big Key Chest', player) in [('Big Key (Misery Mire)', player)])) else state._lttp_has_key('Small Key (Misery Mire)', player, 6)) - set_rule(world.get_location('Misery Mire - Compass Chest', player), lambda state: has_fire_source(state, player)) - set_rule(world.get_location('Misery Mire - Big Key Chest', player), lambda state: has_fire_source(state, player)) - set_rule(world.get_entrance('Misery Mire (Vitreous)', player), lambda state: state.has('Cane of Somaria', player) and can_use_bombs(state, player)) - - set_rule(world.get_entrance('Turtle Rock Entrance Gap', player), lambda state: state.has('Cane of Somaria', player)) - set_rule(world.get_entrance('Turtle Rock Entrance Gap Reverse', player), lambda state: state.has('Cane of Somaria', player)) - set_rule(world.get_location('Turtle Rock - Pokey 1 Key Drop', player), lambda state: can_kill_most_things(state, player, 5)) - set_rule(world.get_location('Turtle Rock - Pokey 2 Key Drop', player), lambda state: can_kill_most_things(state, player, 5)) - set_rule(world.get_location('Turtle Rock - Compass Chest', player), lambda state: state.has('Cane of Somaria', player)) - set_rule(world.get_location('Turtle Rock - Roller Room - Left', player), lambda state: state.has('Cane of Somaria', player) and state.has('Fire Rod', player)) - set_rule(world.get_location('Turtle Rock - Roller Room - Right', player), lambda state: state.has('Cane of Somaria', player) and state.has('Fire Rod', player)) - set_rule(world.get_location('Turtle Rock - Big Chest', player), lambda state: state.has('Big Key (Turtle Rock)', player) and (state.has('Cane of Somaria', player) or state.has('Hookshot', player))) - set_rule(world.get_entrance('Turtle Rock (Big Chest) (North)', player), lambda state: state.has('Cane of Somaria', player) or state.has('Hookshot', player)) - set_rule(world.get_entrance('Turtle Rock Big Key Door', player), lambda state: state.has('Big Key (Turtle Rock)', player) and can_kill_most_things(state, player, 10)) - set_rule(world.get_location('Turtle Rock - Chain Chomps', player), lambda state: can_use_bombs(state, player) or can_shoot_arrows(state, player) - or has_beam_sword(state, player) or state.has_any(["Blue Boomerang", "Red Boomerang", "Hookshot", "Cane of Somaria", "Fire Rod", "Ice Rod"], player)) - set_rule(world.get_entrance('Turtle Rock (Dark Room) (North)', player), lambda state: state.has('Cane of Somaria', player)) - set_rule(world.get_entrance('Turtle Rock (Dark Room) (South)', player), lambda state: state.has('Cane of Somaria', player)) - set_rule(world.get_location('Turtle Rock - Eye Bridge - Bottom Left', player), lambda state: state.has('Cane of Byrna', player) or state.has('Cape', player) or state.has('Mirror Shield', player)) - set_rule(world.get_location('Turtle Rock - Eye Bridge - Bottom Right', player), lambda state: state.has('Cane of Byrna', player) or state.has('Cape', player) or state.has('Mirror Shield', player)) - set_rule(world.get_location('Turtle Rock - Eye Bridge - Top Left', player), lambda state: state.has('Cane of Byrna', player) or state.has('Cape', player) or state.has('Mirror Shield', player)) - set_rule(world.get_location('Turtle Rock - Eye Bridge - Top Right', player), lambda state: state.has('Cane of Byrna', player) or state.has('Cape', player) or state.has('Mirror Shield', player)) - set_rule(world.get_entrance('Turtle Rock (Trinexx)', player), lambda state: state._lttp_has_key('Small Key (Turtle Rock)', player, 6) and state.has('Big Key (Turtle Rock)', player) and state.has('Cane of Somaria', player)) - set_rule(world.get_entrance('Turtle Rock Second Section Bomb Wall', player), lambda state: can_kill_most_things(state, player, 10)) - - if not world.worlds[player].fix_trock_doors: - add_rule(world.get_entrance('Turtle Rock Second Section Bomb Wall', player), lambda state: can_use_bombs(state, player)) - set_rule(world.get_entrance('Turtle Rock Second Section from Bomb Wall', player), lambda state: can_use_bombs(state, player)) - set_rule(world.get_entrance('Turtle Rock Eye Bridge from Bomb Wall', player), lambda state: can_use_bombs(state, player)) - set_rule(world.get_entrance('Turtle Rock Eye Bridge Bomb Wall', player), lambda state: can_use_bombs(state, player)) - - if world.enemy_shuffle[player]: - set_rule(world.get_entrance('Palace of Darkness Bonk Wall', player), lambda state: can_bomb_or_bonk(state, player) and can_kill_most_things(state, player, 3)) + set_rule(multiworld.get_location('Misery Mire - Compass Chest', player), lambda state: has_fire_source(state, player)) + set_rule(multiworld.get_location('Misery Mire - Big Key Chest', player), lambda state: has_fire_source(state, player)) + set_rule(multiworld.get_entrance('Misery Mire (Vitreous)', player), lambda state: state.has('Cane of Somaria', player) and can_use_bombs(state, player)) + + set_rule(multiworld.get_entrance('Turtle Rock Entrance Gap', player), lambda state: state.has('Cane of Somaria', player)) + set_rule(multiworld.get_entrance('Turtle Rock Entrance Gap Reverse', player), lambda state: state.has('Cane of Somaria', player)) + set_rule(multiworld.get_location('Turtle Rock - Pokey 1 Key Drop', player), lambda state: can_kill_most_things(state, player, 5)) + set_rule(multiworld.get_location('Turtle Rock - Pokey 2 Key Drop', player), lambda state: can_kill_most_things(state, player, 5)) + set_rule(multiworld.get_location('Turtle Rock - Compass Chest', player), lambda state: state.has('Cane of Somaria', player)) + set_rule(multiworld.get_location('Turtle Rock - Roller Room - Left', player), lambda state: state.has('Cane of Somaria', player) and state.has('Fire Rod', player)) + set_rule(multiworld.get_location('Turtle Rock - Roller Room - Right', player), lambda state: state.has('Cane of Somaria', player) and state.has('Fire Rod', player)) + set_rule(multiworld.get_location('Turtle Rock - Big Chest', player), lambda state: state.has('Big Key (Turtle Rock)', player) and (state.has('Cane of Somaria', player) or state.has('Hookshot', player))) + set_rule(multiworld.get_entrance('Turtle Rock (Big Chest) (North)', player), lambda state: state.has('Cane of Somaria', player) or state.has('Hookshot', player)) + set_rule(multiworld.get_entrance('Turtle Rock Big Key Door', player), lambda state: state.has('Big Key (Turtle Rock)', player) and can_kill_most_things(state, player, 10)) + set_rule(multiworld.get_location('Turtle Rock - Chain Chomps', player), lambda state: can_use_bombs(state, player) or can_shoot_arrows(state, player) + or has_beam_sword(state, player) or state.has_any(["Blue Boomerang", "Red Boomerang", "Hookshot", "Cane of Somaria", "Fire Rod", "Ice Rod"], player)) + set_rule(multiworld.get_entrance('Turtle Rock (Dark Room) (North)', player), lambda state: state.has('Cane of Somaria', player)) + set_rule(multiworld.get_entrance('Turtle Rock (Dark Room) (South)', player), lambda state: state.has('Cane of Somaria', player)) + set_rule(multiworld.get_location('Turtle Rock - Eye Bridge - Bottom Left', player), lambda state: state.has('Cane of Byrna', player) or state.has('Cape', player) or state.has('Mirror Shield', player)) + set_rule(multiworld.get_location('Turtle Rock - Eye Bridge - Bottom Right', player), lambda state: state.has('Cane of Byrna', player) or state.has('Cape', player) or state.has('Mirror Shield', player)) + set_rule(multiworld.get_location('Turtle Rock - Eye Bridge - Top Left', player), lambda state: state.has('Cane of Byrna', player) or state.has('Cape', player) or state.has('Mirror Shield', player)) + set_rule(multiworld.get_location('Turtle Rock - Eye Bridge - Top Right', player), lambda state: state.has('Cane of Byrna', player) or state.has('Cape', player) or state.has('Mirror Shield', player)) + set_rule(multiworld.get_entrance('Turtle Rock (Trinexx)', player), lambda state: state._lttp_has_key('Small Key (Turtle Rock)', player, 6) and state.has('Big Key (Turtle Rock)', player) and state.has('Cane of Somaria', player)) + set_rule(multiworld.get_entrance('Turtle Rock Second Section Bomb Wall', player), lambda state: can_kill_most_things(state, player, 10)) + + if not multiworld.worlds[player].fix_trock_doors: + add_rule(multiworld.get_entrance('Turtle Rock Second Section Bomb Wall', player), lambda state: can_use_bombs(state, player)) + set_rule(multiworld.get_entrance('Turtle Rock Second Section from Bomb Wall', player), lambda state: can_use_bombs(state, player)) + set_rule(multiworld.get_entrance('Turtle Rock Eye Bridge from Bomb Wall', player), lambda state: can_use_bombs(state, player)) + set_rule(multiworld.get_entrance('Turtle Rock Eye Bridge Bomb Wall', player), lambda state: can_use_bombs(state, player)) + + if multiworld.enemy_shuffle[player]: + set_rule(multiworld.get_entrance('Palace of Darkness Bonk Wall', player), lambda state: can_bomb_or_bonk(state, player) and can_kill_most_things(state, player, 3)) else: - set_rule(world.get_entrance('Palace of Darkness Bonk Wall', player), lambda state: can_bomb_or_bonk(state, player) and can_shoot_arrows(state, player)) - set_rule(world.get_entrance('Palace of Darkness Hammer Peg Drop', player), lambda state: state.has('Hammer', player)) - set_rule(world.get_entrance('Palace of Darkness Bridge Room', player), lambda state: state._lttp_has_key('Small Key (Palace of Darkness)', player, 1)) # If we can reach any other small key door, we already have back door access to this area - set_rule(world.get_entrance('Palace of Darkness Big Key Door', player), lambda state: state._lttp_has_key('Small Key (Palace of Darkness)', player, 6) and state.has('Big Key (Palace of Darkness)', player) and can_shoot_arrows(state, player) and state.has('Hammer', player)) - set_rule(world.get_entrance('Palace of Darkness (North)', player), lambda state: state._lttp_has_key('Small Key (Palace of Darkness)', player, 4)) - set_rule(world.get_location('Palace of Darkness - Big Chest', player), lambda state: can_use_bombs(state, player) and state.has('Big Key (Palace of Darkness)', player)) - set_rule(world.get_location('Palace of Darkness - The Arena - Ledge', player), lambda state: can_use_bombs(state, player)) - if world.pot_shuffle[player]: + set_rule(multiworld.get_entrance('Palace of Darkness Bonk Wall', player), lambda state: can_bomb_or_bonk(state, player) and can_shoot_arrows(state, player)) + set_rule(multiworld.get_entrance('Palace of Darkness Hammer Peg Drop', player), lambda state: state.has('Hammer', player)) + set_rule(multiworld.get_entrance('Palace of Darkness Bridge Room', player), lambda state: state._lttp_has_key('Small Key (Palace of Darkness)', player, 1)) # If we can reach any other small key door, we already have back door access to this area + set_rule(multiworld.get_entrance('Palace of Darkness Big Key Door', player), lambda state: state._lttp_has_key('Small Key (Palace of Darkness)', player, 6) and state.has('Big Key (Palace of Darkness)', player) and can_shoot_arrows(state, player) and state.has('Hammer', player)) + set_rule(multiworld.get_entrance('Palace of Darkness (North)', player), lambda state: state._lttp_has_key('Small Key (Palace of Darkness)', player, 4)) + set_rule(multiworld.get_location('Palace of Darkness - Big Chest', player), lambda state: can_use_bombs(state, player) and state.has('Big Key (Palace of Darkness)', player)) + set_rule(multiworld.get_location('Palace of Darkness - The Arena - Ledge', player), lambda state: can_use_bombs(state, player)) + if multiworld.pot_shuffle[player]: # chest switch may be up on ledge where bombs are required - set_rule(world.get_location('Palace of Darkness - Stalfos Basement', player), lambda state: can_use_bombs(state, player)) + set_rule(multiworld.get_location('Palace of Darkness - Stalfos Basement', player), lambda state: can_use_bombs(state, player)) - set_rule(world.get_entrance('Palace of Darkness Big Key Chest Staircase', player), lambda state: can_use_bombs(state, player) and (state._lttp_has_key('Small Key (Palace of Darkness)', player, 6) or ( + set_rule(multiworld.get_entrance('Palace of Darkness Big Key Chest Staircase', player), lambda state: can_use_bombs(state, player) and (state._lttp_has_key('Small Key (Palace of Darkness)', player, 6) or ( location_item_name(state, 'Palace of Darkness - Big Key Chest', player) in [('Small Key (Palace of Darkness)', player)] and state._lttp_has_key('Small Key (Palace of Darkness)', player, 3)))) - if world.accessibility[player] != 'locations': - set_always_allow(world.get_location('Palace of Darkness - Big Key Chest', player), lambda state, item: item.name == 'Small Key (Palace of Darkness)' and item.player == player and state._lttp_has_key('Small Key (Palace of Darkness)', player, 5)) + if multiworld.accessibility[player] != 'locations': + set_always_allow(multiworld.get_location('Palace of Darkness - Big Key Chest', player), lambda state, item: item.name == 'Small Key (Palace of Darkness)' and item.player == player and state._lttp_has_key('Small Key (Palace of Darkness)', player, 5)) - set_rule(world.get_entrance('Palace of Darkness Spike Statue Room Door', player), lambda state: state._lttp_has_key('Small Key (Palace of Darkness)', player, 6) or ( + set_rule(multiworld.get_entrance('Palace of Darkness Spike Statue Room Door', player), lambda state: state._lttp_has_key('Small Key (Palace of Darkness)', player, 6) or ( location_item_name(state, 'Palace of Darkness - Harmless Hellway', player) in [('Small Key (Palace of Darkness)', player)] and state._lttp_has_key('Small Key (Palace of Darkness)', player, 4))) - if world.accessibility[player] != 'locations': - set_always_allow(world.get_location('Palace of Darkness - Harmless Hellway', player), lambda state, item: item.name == 'Small Key (Palace of Darkness)' and item.player == player and state._lttp_has_key('Small Key (Palace of Darkness)', player, 5)) + if multiworld.accessibility[player] != 'locations': + set_always_allow(multiworld.get_location('Palace of Darkness - Harmless Hellway', player), lambda state, item: item.name == 'Small Key (Palace of Darkness)' and item.player == player and state._lttp_has_key('Small Key (Palace of Darkness)', player, 5)) - set_rule(world.get_entrance('Palace of Darkness Maze Door', player), lambda state: state._lttp_has_key('Small Key (Palace of Darkness)', player, 6)) + set_rule(multiworld.get_entrance('Palace of Darkness Maze Door', player), lambda state: state._lttp_has_key('Small Key (Palace of Darkness)', player, 6)) # these key rules are conservative, you might be able to get away with more lenient rules randomizer_room_chests = ['Ganons Tower - Randomizer Room - Top Left', 'Ganons Tower - Randomizer Room - Top Right', 'Ganons Tower - Randomizer Room - Bottom Left', 'Ganons Tower - Randomizer Room - Bottom Right'] compass_room_chests = ['Ganons Tower - Compass Room - Top Left', 'Ganons Tower - Compass Room - Top Right', 'Ganons Tower - Compass Room - Bottom Left', 'Ganons Tower - Compass Room - Bottom Right', 'Ganons Tower - Conveyor Star Pits Pot Key'] back_chests = ['Ganons Tower - Bob\'s Chest', 'Ganons Tower - Big Chest', 'Ganons Tower - Big Key Room - Left', 'Ganons Tower - Big Key Room - Right', 'Ganons Tower - Big Key Chest'] - set_rule(world.get_location('Ganons Tower - Bob\'s Torch', player), lambda state: state.has('Pegasus Boots', player)) - set_rule(world.get_entrance('Ganons Tower (Tile Room)', player), lambda state: state.has('Cane of Somaria', player)) - set_rule(world.get_entrance('Ganons Tower (Hookshot Room)', player), lambda state: state.has('Hammer', player) and (state.has('Hookshot', player) or state.has('Pegasus Boots', player))) - set_rule(world.get_entrance('Ganons Tower (Map Room)', player), lambda state: state._lttp_has_key('Small Key (Ganons Tower)', player, 8) or ( + set_rule(multiworld.get_location('Ganons Tower - Bob\'s Torch', player), lambda state: state.has('Pegasus Boots', player)) + set_rule(multiworld.get_entrance('Ganons Tower (Tile Room)', player), lambda state: state.has('Cane of Somaria', player)) + set_rule(multiworld.get_entrance('Ganons Tower (Hookshot Room)', player), lambda state: state.has('Hammer', player) and (state.has('Hookshot', player) or state.has('Pegasus Boots', player))) + set_rule(multiworld.get_entrance('Ganons Tower (Map Room)', player), lambda state: state._lttp_has_key('Small Key (Ganons Tower)', player, 8) or ( location_item_name(state, 'Ganons Tower - Map Chest', player) in [('Big Key (Ganons Tower)', player)] and state._lttp_has_key('Small Key (Ganons Tower)', player, 6))) # this seemed to be causing generation failure, disable for now @@ -540,63 +542,63 @@ def global_rules(world, player): # It is possible to need more than 6 keys to get through this entrance if you spend keys elsewhere. We reflect this in the chest requirements. # However we need to leave these at the lower values to derive that with 7 keys it is always possible to reach Bob and Ice Armos. - set_rule(world.get_entrance('Ganons Tower (Double Switch Room)', player), lambda state: state._lttp_has_key('Small Key (Ganons Tower)', player, 6)) + set_rule(multiworld.get_entrance('Ganons Tower (Double Switch Room)', player), lambda state: state._lttp_has_key('Small Key (Ganons Tower)', player, 6)) # It is possible to need more than 7 keys .... - set_rule(world.get_entrance('Ganons Tower (Firesnake Room)', player), lambda state: state._lttp_has_key('Small Key (Ganons Tower)', player, 7) or ( + set_rule(multiworld.get_entrance('Ganons Tower (Firesnake Room)', player), lambda state: state._lttp_has_key('Small Key (Ganons Tower)', player, 7) or ( item_name_in_location_names(state, 'Big Key (Ganons Tower)', player, zip(randomizer_room_chests + back_chests, [player] * len(randomizer_room_chests + back_chests))) and state._lttp_has_key('Small Key (Ganons Tower)', player, 5))) # The actual requirements for these rooms to avoid key-lock - set_rule(world.get_location('Ganons Tower - Firesnake Room', player), lambda state: state._lttp_has_key('Small Key (Ganons Tower)', player, 7) or - ((item_name_in_location_names(state, 'Big Key (Ganons Tower)', player, zip(randomizer_room_chests, [player] * len(randomizer_room_chests))) or item_name_in_location_names(state, 'Small Key (Ganons Tower)', player, [('Ganons Tower - Firesnake Room', player)])) and state._lttp_has_key('Small Key (Ganons Tower)', player, 5))) + set_rule(multiworld.get_location('Ganons Tower - Firesnake Room', player), lambda state: state._lttp_has_key('Small Key (Ganons Tower)', player, 7) or + ((item_name_in_location_names(state, 'Big Key (Ganons Tower)', player, zip(randomizer_room_chests, [player] * len(randomizer_room_chests))) or item_name_in_location_names(state, 'Small Key (Ganons Tower)', player, [('Ganons Tower - Firesnake Room', player)])) and state._lttp_has_key('Small Key (Ganons Tower)', player, 5))) for location in randomizer_room_chests: - set_rule(world.get_location(location, player), lambda state: state._lttp_has_key('Small Key (Ganons Tower)', player, 8) or ( + set_rule(multiworld.get_location(location, player), lambda state: state._lttp_has_key('Small Key (Ganons Tower)', player, 8) or ( item_name_in_location_names(state, 'Big Key (Ganons Tower)', player, zip(randomizer_room_chests, [player] * len(randomizer_room_chests))) and state._lttp_has_key('Small Key (Ganons Tower)', player, 6))) # Once again it is possible to need more than 7 keys... - set_rule(world.get_entrance('Ganons Tower (Tile Room) Key Door', player), lambda state: state.has('Fire Rod', player) and (state._lttp_has_key('Small Key (Ganons Tower)', player, 7) or ( + set_rule(multiworld.get_entrance('Ganons Tower (Tile Room) Key Door', player), lambda state: state.has('Fire Rod', player) and (state._lttp_has_key('Small Key (Ganons Tower)', player, 7) or ( item_name_in_location_names(state, 'Big Key (Ganons Tower)', player, zip(compass_room_chests, [player] * len(compass_room_chests))) and state._lttp_has_key('Small Key (Ganons Tower)', player, 5)))) - set_rule(world.get_entrance('Ganons Tower (Bottom) (East)', player), lambda state: state._lttp_has_key('Small Key (Ganons Tower)', player, 7) or ( + set_rule(multiworld.get_entrance('Ganons Tower (Bottom) (East)', player), lambda state: state._lttp_has_key('Small Key (Ganons Tower)', player, 7) or ( item_name_in_location_names(state, 'Big Key (Ganons Tower)', player, zip(back_chests, [player] * len(back_chests))) and state._lttp_has_key('Small Key (Ganons Tower)', player, 5))) # Actual requirements for location in compass_room_chests: - set_rule(world.get_location(location, player), lambda state: (can_use_bombs(state, player) or state.has("Cane of Somaria", player)) and state.has('Fire Rod', player) and (state._lttp_has_key('Small Key (Ganons Tower)', player, 7) or ( + set_rule(multiworld.get_location(location, player), lambda state: (can_use_bombs(state, player) or state.has("Cane of Somaria", player)) and state.has('Fire Rod', player) and (state._lttp_has_key('Small Key (Ganons Tower)', player, 7) or ( item_name_in_location_names(state, 'Big Key (Ganons Tower)', player, zip(compass_room_chests, [player] * len(compass_room_chests))) and state._lttp_has_key('Small Key (Ganons Tower)', player, 5)))) - set_rule(world.get_location('Ganons Tower - Big Chest', player), lambda state: state.has('Big Key (Ganons Tower)', player)) + set_rule(multiworld.get_location('Ganons Tower - Big Chest', player), lambda state: state.has('Big Key (Ganons Tower)', player)) - set_rule(world.get_location('Ganons Tower - Big Key Room - Left', player), + set_rule(multiworld.get_location('Ganons Tower - Big Key Room - Left', player), lambda state: can_use_bombs(state, player) and state.multiworld.get_location('Ganons Tower - Big Key Room - Left', player).parent_region.dungeon.bosses['bottom'].can_defeat(state)) - set_rule(world.get_location('Ganons Tower - Big Key Chest', player), + set_rule(multiworld.get_location('Ganons Tower - Big Key Chest', player), lambda state: can_use_bombs(state, player) and state.multiworld.get_location('Ganons Tower - Big Key Chest', player).parent_region.dungeon.bosses['bottom'].can_defeat(state)) - set_rule(world.get_location('Ganons Tower - Big Key Room - Right', player), + set_rule(multiworld.get_location('Ganons Tower - Big Key Room - Right', player), lambda state: can_use_bombs(state, player) and state.multiworld.get_location('Ganons Tower - Big Key Room - Right', player).parent_region.dungeon.bosses['bottom'].can_defeat(state)) - if world.enemy_shuffle[player]: - set_rule(world.get_entrance('Ganons Tower Big Key Door', player), + if multiworld.enemy_shuffle[player]: + set_rule(multiworld.get_entrance('Ganons Tower Big Key Door', player), lambda state: state.has('Big Key (Ganons Tower)', player)) else: - set_rule(world.get_entrance('Ganons Tower Big Key Door', player), + set_rule(multiworld.get_entrance('Ganons Tower Big Key Door', player), lambda state: state.has('Big Key (Ganons Tower)', player) and can_shoot_arrows(state, player)) - set_rule(world.get_entrance('Ganons Tower Torch Rooms', player), + set_rule(multiworld.get_entrance('Ganons Tower Torch Rooms', player), lambda state: can_kill_most_things(state, player, 8) and has_fire_source(state, player) and state.multiworld.get_entrance('Ganons Tower Torch Rooms', player).parent_region.dungeon.bosses['middle'].can_defeat(state)) - set_rule(world.get_location('Ganons Tower - Mini Helmasaur Key Drop', player), lambda state: can_kill_most_things(state, player, 1)) - set_rule(world.get_location('Ganons Tower - Pre-Moldorm Chest', player), + set_rule(multiworld.get_location('Ganons Tower - Mini Helmasaur Key Drop', player), lambda state: can_kill_most_things(state, player, 1)) + set_rule(multiworld.get_location('Ganons Tower - Pre-Moldorm Chest', player), lambda state: state._lttp_has_key('Small Key (Ganons Tower)', player, 7)) - set_rule(world.get_entrance('Ganons Tower Moldorm Door', player), + set_rule(multiworld.get_entrance('Ganons Tower Moldorm Door', player), lambda state: state._lttp_has_key('Small Key (Ganons Tower)', player, 8)) - set_rule(world.get_entrance('Ganons Tower Moldorm Gap', player), + set_rule(multiworld.get_entrance('Ganons Tower Moldorm Gap', player), lambda state: state.has('Hookshot', player) and state.multiworld.get_entrance('Ganons Tower Moldorm Gap', player).parent_region.dungeon.bosses['top'].can_defeat(state)) - set_defeat_dungeon_boss_rule(world.get_location('Agahnim 2', player)) - ganon = world.get_location('Ganon', player) + set_defeat_dungeon_boss_rule(multiworld.get_location('Agahnim 2', player)) + ganon = multiworld.get_location('Ganon', player) set_rule(ganon, lambda state: GanonDefeatRule(state, player)) - if world.goal[player] in ['ganon_triforce_hunt', 'local_ganon_triforce_hunt']: + if multiworld.goal[player] in ['ganon_triforce_hunt', 'local_ganon_triforce_hunt']: add_rule(ganon, lambda state: has_triforce_pieces(state, player)) - elif world.goal[player] == 'ganon_pedestal': - add_rule(world.get_location('Ganon', player), lambda state: state.can_reach('Master Sword Pedestal', 'Location', player)) + elif multiworld.goal[player] == 'ganon_pedestal': + add_rule(multiworld.get_location('Ganon', player), lambda state: state.can_reach('Master Sword Pedestal', 'Location', player)) else: add_rule(ganon, lambda state: has_crystals(state, state.multiworld.crystals_needed_for_ganon[player], player)) - set_rule(world.get_entrance('Ganon Drop', player), lambda state: has_beam_sword(state, player)) # need to damage ganon to get tiles to drop + set_rule(multiworld.get_entrance('Ganon Drop', player), lambda state: has_beam_sword(state, player)) # need to damage ganon to get tiles to drop - set_rule(world.get_location('Flute Activation Spot', player), lambda state: state.has('Flute', player)) + set_rule(multiworld.get_location('Flute Activation Spot', player), lambda state: state.has('Flute', player)) def default_rules(world, player): @@ -1106,14 +1108,10 @@ def set_trock_key_rules(world, player): all_state.stale[player] = True # Check if each of the four main regions of the dungoen can be reached. The previous code section prevents key-costing moves within the dungeon. - can_reach_back = all_state.can_reach(world.get_region('Turtle Rock (Eye Bridge)', player)) if world.can_access_trock_eyebridge[player] is None else world.can_access_trock_eyebridge[player] - world.can_access_trock_eyebridge[player] = can_reach_back - can_reach_front = all_state.can_reach(world.get_region('Turtle Rock (Entrance)', player)) if world.can_access_trock_front[player] is None else world.can_access_trock_front[player] - world.can_access_trock_front[player] = can_reach_front - can_reach_big_chest = all_state.can_reach(world.get_region('Turtle Rock (Big Chest)', player)) if world.can_access_trock_big_chest[player] is None else world.can_access_trock_big_chest[player] - world.can_access_trock_big_chest[player] = can_reach_big_chest - can_reach_middle = all_state.can_reach(world.get_region('Turtle Rock (Second Section)', player)) if world.can_access_trock_middle[player] is None else world.can_access_trock_middle[player] - world.can_access_trock_middle[player] = can_reach_middle + can_reach_back = all_state.can_reach(world.get_region('Turtle Rock (Eye Bridge)', player)) + can_reach_front = all_state.can_reach(world.get_region('Turtle Rock (Entrance)', player)) + can_reach_big_chest = all_state.can_reach(world.get_region('Turtle Rock (Big Chest)', player)) + can_reach_middle = all_state.can_reach(world.get_region('Turtle Rock (Second Section)', player)) # If you can't enter from the back, the door to the front of TR requires only 2 small keys if the big key is in one of these chests since 2 key doors are locked behind the big key door. # If you can only enter from the middle, this includes all locations that can only be reached by exiting the front. This can include Laser Bridge and Crystaroller if the front and back connect via Dark DM Ledge! diff --git a/worlds/alttp/StateHelpers.py b/worlds/alttp/StateHelpers.py index 4ed1b1caf205..80bf3c1ad77f 100644 --- a/worlds/alttp/StateHelpers.py +++ b/worlds/alttp/StateHelpers.py @@ -30,7 +30,7 @@ def can_shoot_arrows(state: CollectionState, player: int) -> bool: def has_triforce_pieces(state: CollectionState, player: int) -> bool: - count = state.multiworld.treasure_hunt_count[player] + count = state.multiworld.worlds[player].treasure_hunt_count return state.count('Triforce Piece', player) + state.count('Power Star', player) >= count @@ -48,8 +48,8 @@ def can_lift_heavy_rocks(state: CollectionState, player: int) -> bool: def bottle_count(state: CollectionState, player: int) -> int: - return min(state.multiworld.difficulty_requirements[player].progressive_bottle_limit, - state.count_group("Bottles", player)) + return min(state.multiworld.worlds[player].difficulty_requirements.progressive_bottle_limit, + state.count_group("Bottles", player)) def has_hearts(state: CollectionState, player: int, count: int) -> int: @@ -59,7 +59,7 @@ def has_hearts(state: CollectionState, player: int, count: int) -> int: def heart_count(state: CollectionState, player: int) -> int: # Warning: This only considers items that are marked as advancement items - diff = state.multiworld.difficulty_requirements[player] + diff = state.multiworld.worlds[player].difficulty_requirements return min(state.count('Boss Heart Container', player), diff.boss_heart_container_limit) \ + state.count('Sanctuary Heart Container', player) \ + min(state.count('Piece of Heart', player), diff.heart_piece_limit) // 4 \ @@ -171,10 +171,10 @@ def can_melt_things(state: CollectionState, player: int) -> bool: def has_misery_mire_medallion(state: CollectionState, player: int) -> bool: - return state.has(state.multiworld.required_medallions[player][0], player) + return state.has(state.multiworld.worlds[player].required_medallions[0], player) def has_turtle_rock_medallion(state: CollectionState, player: int) -> bool: - return state.has(state.multiworld.required_medallions[player][1], player) + return state.has(state.multiworld.worlds[player].required_medallions[1], player) def can_boots_clip_lw(state: CollectionState, player: int) -> bool: diff --git a/worlds/alttp/UnderworldGlitchRules.py b/worlds/alttp/UnderworldGlitchRules.py index 497d5de496c3..50397dea166c 100644 --- a/worlds/alttp/UnderworldGlitchRules.py +++ b/worlds/alttp/UnderworldGlitchRules.py @@ -15,7 +15,7 @@ def underworld_glitch_connections(world, player): specrock.exits.append(kikiskip) mire.exits.extend([mire_to_hera, mire_to_swamp]) - if world.fix_fake_world[player]: + if world.worlds[player].fix_fake_world: kikiskip.connect(world.get_entrance('Palace of Darkness Exit', player).connected_region) mire_to_hera.connect(world.get_entrance('Tower of Hera Exit', player).connected_region) mire_to_swamp.connect(world.get_entrance('Swamp Palace Exit', player).connected_region) @@ -38,8 +38,8 @@ def fake_pearl_state(state, player): # Sets the rules on where we can actually go using this clip. # Behavior differs based on what type of ER shuffle we're playing. def dungeon_reentry_rules(world, player, clip: Entrance, dungeon_region: str, dungeon_exit: str): - fix_dungeon_exits = world.fix_palaceofdarkness_exit[player] - fix_fake_worlds = world.fix_fake_world[player] + fix_dungeon_exits = world.worlds[player].fix_palaceofdarkness_exit + fix_fake_worlds = world.worlds[player].fix_fake_world dungeon_entrance = [r for r in world.get_region(dungeon_region, player).entrances if r.name != clip.name][0] if not fix_dungeon_exits: # vanilla, simple, restricted, dungeons_simple; should never have fake worlds fix @@ -52,7 +52,7 @@ def dungeon_reentry_rules(world, player, clip: Entrance, dungeon_region: str, du add_rule(clip, lambda state: state.has('Cape', player) or has_beam_sword(state, player) or state.has('Beat Agahnim 1', player)) # kill/bypass barrier # Then we set a restriction on exiting the dungeon, so you can't leave unless you got in normally. add_rule(world.get_entrance(dungeon_exit, player), lambda state: dungeon_entrance.can_reach(state)) - elif not fix_fake_worlds: # full, dungeons_full; fixed dungeon exits, but no fake worlds fix + elif not fix_fake_worlds: # full, dungeons_full; fixed dungeon exits, but no fake worlds fix # Entry requires the entrance's requirements plus a fake pearl, but you don't gain logical access to the surrounding region. add_rule(clip, lambda state: dungeon_entrance.access_rule(fake_pearl_state(state, player))) # exiting restriction @@ -62,9 +62,6 @@ def dungeon_reentry_rules(world, player, clip: Entrance, dungeon_region: str, du def underworld_glitches_rules(world, player): - fix_dungeon_exits = world.fix_palaceofdarkness_exit[player] - fix_fake_worlds = world.fix_fake_world[player] - # Ice Palace Entrance Clip # This is the easiest one since it's a simple internal clip. # Need to also add melting to freezor chest since it's otherwise assumed. @@ -92,7 +89,7 @@ def underworld_glitches_rules(world, player): # Build the rule for SP moat. # We need to be able to s+q to old man, then go to either Mire or Hera at either Hera or GT. # First we require a certain type of entrance shuffle, then build the rule from its pieces. - if not world.swamp_patch_required[player]: + if not world.worlds[player].swamp_patch_required: if world.entrance_shuffle[player] in ['vanilla', 'dungeons_simple', 'dungeons_full', 'dungeons_crossed']: rule_map = { 'Misery Mire (Entrance)': (lambda state: True), diff --git a/worlds/alttp/__init__.py b/worlds/alttp/__init__.py index 9abc15b75bc9..f84c28be4bcc 100644 --- a/worlds/alttp/__init__.py +++ b/worlds/alttp/__init__.py @@ -251,6 +251,17 @@ def enemizer_path(self) -> str: dungeons: typing.Dict[str, Dungeon] waterfall_fairy_bottle_fill: str pyramid_fairy_bottle_fill: str + escape_assist: list + + can_take_damage: bool = True + swamp_patch_required: bool = False + powder_patch_required: bool = False + ganon_at_pyramid: bool = True + ganonstower_vanilla: bool = True + fix_fake_world: bool = True + + clock_mode: str = "" + treasure_hunt_count: int = 1 def __init__(self, *args, **kwargs): self.dungeon_local_item_names = set() @@ -265,6 +276,8 @@ def __init__(self, *args, **kwargs): self.fix_skullwoods_exit = None self.fix_palaceofdarkness_exit = None self.fix_trock_exit = None + self.required_medallions = ["Ether", "Quake"] + self.escape_assist = [] super(ALTTPWorld, self).__init__(*args, **kwargs) @classmethod @@ -298,7 +311,7 @@ def generate_early(self): "Bottle (Red Potion)", "Bottle (Green Potion)", "Bottle (Blue Potion)", "Bottle (Bee)", "Bottle (Good Bee)" ] - if multiworld.difficulty[player] not in ["hard", "expert"]: + if multiworld.item_pool[player] not in ["hard", "expert"]: bottle_options.append("Bottle (Fairy)") self.waterfall_fairy_bottle_fill = self.random.choice(bottle_options) self.pyramid_fairy_bottle_fill = self.random.choice(bottle_options) @@ -344,7 +357,7 @@ def generate_early(self): if option == "original_dungeon": self.dungeon_specific_item_names |= self.item_name_groups[option.item_name_group] - multiworld.difficulty_requirements[player] = difficulties[multiworld.item_pool[player].current_key] + self.difficulty_requirements = difficulties[multiworld.item_pool[player].current_key] # enforce pre-defined local items. if multiworld.goal[player] in ["local_triforce_hunt", "local_ganon_triforce_hunt"]: @@ -370,7 +383,7 @@ def create_regions(self): if (multiworld.glitches_required[player] not in ["no_glitches", "minor_glitches"] and multiworld.entrance_shuffle[player] in [ "vanilla", "dungeons_simple", "dungeons_full", "simple", "restricted", "full"]): - multiworld.fix_fake_world[player] = False + self.fix_fake_world = False # seeded entrance shuffle old_random = multiworld.random @@ -438,15 +451,16 @@ def collect_item(self, state: CollectionState, item: Item, remove=False): if 'Sword' in item_name: if state.has('Golden Sword', item.player): pass - elif state.has('Tempered Sword', item.player) and self.multiworld.difficulty_requirements[ - item.player].progressive_sword_limit >= 4: + elif (state.has('Tempered Sword', item.player) and + self.difficulty_requirements.progressive_sword_limit >= 4): return 'Golden Sword' - elif state.has('Master Sword', item.player) and self.multiworld.difficulty_requirements[ - item.player].progressive_sword_limit >= 3: + elif (state.has('Master Sword', item.player) and + self.difficulty_requirements.progressive_sword_limit >= 3): return 'Tempered Sword' - elif state.has('Fighter Sword', item.player) and self.multiworld.difficulty_requirements[item.player].progressive_sword_limit >= 2: + elif (state.has('Fighter Sword', item.player) and + self.difficulty_requirements.progressive_sword_limit >= 2): return 'Master Sword' - elif self.multiworld.difficulty_requirements[item.player].progressive_sword_limit >= 1: + elif self.difficulty_requirements.progressive_sword_limit >= 1: return 'Fighter Sword' elif 'Glove' in item_name: if state.has('Titans Mitts', item.player): @@ -458,20 +472,22 @@ def collect_item(self, state: CollectionState, item: Item, remove=False): elif 'Shield' in item_name: if state.has('Mirror Shield', item.player): return - elif state.has('Red Shield', item.player) and self.multiworld.difficulty_requirements[item.player].progressive_shield_limit >= 3: + elif (state.has('Red Shield', item.player) and + self.difficulty_requirements.progressive_shield_limit >= 3): return 'Mirror Shield' - elif state.has('Blue Shield', item.player) and self.multiworld.difficulty_requirements[item.player].progressive_shield_limit >= 2: + elif (state.has('Blue Shield', item.player) and + self.difficulty_requirements.progressive_shield_limit >= 2): return 'Red Shield' - elif self.multiworld.difficulty_requirements[item.player].progressive_shield_limit >= 1: + elif self.difficulty_requirements.progressive_shield_limit >= 1: return 'Blue Shield' elif 'Bow' in item_name: if state.has('Silver Bow', item.player): return - elif state.has('Bow', item.player) and (self.multiworld.difficulty_requirements[item.player].progressive_bow_limit >= 2 - or self.multiworld.glitches_required[item.player] == 'no_glitches' - or self.multiworld.swordless[item.player]): # modes where silver bow is always required for ganon + elif state.has('Bow', item.player) and (self.difficulty_requirements.progressive_bow_limit >= 2 + or self.glitches_required == 'no_glitches' + or self.swordless): # modes where silver bow is always required for ganon return 'Silver Bow' - elif self.multiworld.difficulty_requirements[item.player].progressive_bow_limit >= 1: + elif self.difficulty_requirements.progressive_bow_limit >= 1: return 'Bow' elif item.advancement: return item_name @@ -660,7 +676,7 @@ def stage_fill_hook(cls, multiworld, progitempool, usefulitempool, filleritempoo trash_counts = {} for player in multiworld.get_game_players("A Link to the Past"): world = multiworld.worlds[player] - if not multiworld.ganonstower_vanilla[player] or \ + if not world.ganonstower_vanilla or \ world.options.glitches_required.current_key in {'overworld_glitches', 'hybrid_major_glitches', "no_logic"}: pass elif 'triforce_hunt' in world.options.goal.current_key and ('local' in world.options.goal.current_key or multiworld.players == 1): @@ -701,10 +717,10 @@ def write_spoiler(self, spoiler_handle: typing.TextIO) -> None: player_name = self.multiworld.get_player_name(self.player) spoiler_handle.write("\n\nMedallions:\n") spoiler_handle.write(f"\nMisery Mire ({player_name}):" - f" {self.multiworld.required_medallions[self.player][0]}") + f" {self.required_medallions[0]}") spoiler_handle.write( f"\nTurtle Rock ({player_name}):" - f" {self.multiworld.required_medallions[self.player][1]}") + f" {self.required_medallions[1]}") spoiler_handle.write("\n\nFairy Fountain Bottle Fill:\n") spoiler_handle.write(f"\nPyramid Fairy ({player_name}):" f" {self.pyramid_fairy_bottle_fill}") @@ -815,8 +831,8 @@ def fill_slot_data(self): slot_data = {option_name: getattr(self.multiworld, option_name)[self.player].value for option_name in slot_options} slot_data.update({ - 'mm_medalion': self.multiworld.required_medallions[self.player][0], - 'tr_medalion': self.multiworld.required_medallions[self.player][1], + 'mm_medalion': self.required_medallions[0], + 'tr_medalion': self.required_medallions[1], } ) return slot_data diff --git a/worlds/alttp/test/__init__.py b/worlds/alttp/test/__init__.py index 49033a6ce36a..307e75381d7e 100644 --- a/worlds/alttp/test/__init__.py +++ b/worlds/alttp/test/__init__.py @@ -7,7 +7,9 @@ class LTTPTestBase(unittest.TestCase): def world_setup(self): + from worlds.alttp.Options import Medallion self.multiworld = MultiWorld(1) + self.multiworld.game[1] = "A Link to the Past" self.multiworld.state = CollectionState(self.multiworld) self.multiworld.set_seed(None) args = Namespace() @@ -15,3 +17,6 @@ def world_setup(self): setattr(args, name, {1: option.from_any(getattr(option, "default"))}) self.multiworld.set_options(args) self.world = self.multiworld.worlds[1] + # by default medallion access is randomized, for unittests we set it to vanilla + self.world.options.misery_mire_medallion.value = Medallion.option_ether + self.world.options.turtle_rock_medallion.value = Medallion.option_quake diff --git a/worlds/alttp/test/dungeons/TestDungeon.py b/worlds/alttp/test/dungeons/TestDungeon.py index 128f8b41b75e..a31ddd68b2e1 100644 --- a/worlds/alttp/test/dungeons/TestDungeon.py +++ b/worlds/alttp/test/dungeons/TestDungeon.py @@ -13,7 +13,7 @@ def setUp(self): self.world_setup() self.starting_regions = [] # Where to start exploring self.remove_exits = [] # Block dungeon exits - self.multiworld.difficulty_requirements[1] = difficulties['normal'] + self.multiworld.worlds[1].difficulty_requirements = difficulties['normal'] self.multiworld.bombless_start[1].value = True self.multiworld.shuffle_capacity_upgrades[1].value = True create_regions(self.multiworld, 1) @@ -23,7 +23,7 @@ def setUp(self): connect_simple(self.multiworld, exitname, regionname, 1) connect_simple(self.multiworld, 'Big Bomb Shop', 'Big Bomb Shop', 1) self.multiworld.get_region('Menu', 1).exits = [] - self.multiworld.swamp_patch_required[1] = True + self.multiworld.worlds[1].swamp_patch_required = True self.world.set_rules() self.world.create_items() self.multiworld.itempool.extend(get_dungeon_item_pool(self.multiworld)) diff --git a/worlds/alttp/test/inverted/TestInverted.py b/worlds/alttp/test/inverted/TestInverted.py index 069639e81b9d..59a3d7f5f4fa 100644 --- a/worlds/alttp/test/inverted/TestInverted.py +++ b/worlds/alttp/test/inverted/TestInverted.py @@ -13,7 +13,7 @@ class TestInverted(TestBase, LTTPTestBase): def setUp(self): self.world_setup() - self.multiworld.difficulty_requirements[1] = difficulties['normal'] + self.multiworld.worlds[1].difficulty_requirements = difficulties['normal'] self.multiworld.mode[1].value = 2 self.multiworld.bombless_start[1].value = True self.multiworld.shuffle_capacity_upgrades[1].value = True @@ -22,7 +22,6 @@ def setUp(self): create_shops(self.multiworld, 1) link_inverted_entrances(self.multiworld, 1) self.world.create_items() - self.multiworld.required_medallions[1] = ['Ether', 'Quake'] self.multiworld.itempool.extend(get_dungeon_item_pool(self.multiworld)) self.multiworld.itempool.extend(item_factory(['Green Pendant', 'Red Pendant', 'Blue Pendant', 'Beat Agahnim 1', 'Beat Agahnim 2', 'Crystal 1', 'Crystal 2', 'Crystal 3', 'Crystal 4', 'Crystal 5', 'Crystal 6', 'Crystal 7'], self.world)) self.multiworld.get_location('Agahnim 1', 1).item = None diff --git a/worlds/alttp/test/inverted/TestInvertedBombRules.py b/worlds/alttp/test/inverted/TestInvertedBombRules.py index 83a25812c9b6..a33beca7a9f9 100644 --- a/worlds/alttp/test/inverted/TestInvertedBombRules.py +++ b/worlds/alttp/test/inverted/TestInvertedBombRules.py @@ -11,7 +11,7 @@ class TestInvertedBombRules(LTTPTestBase): def setUp(self): self.world_setup() - self.multiworld.difficulty_requirements[1] = difficulties['normal'] + self.multiworld.worlds[1].difficulty_requirements = difficulties['normal'] self.multiworld.mode[1].value = 2 create_inverted_regions(self.multiworld, 1) self.multiworld.worlds[1].create_dungeons() diff --git a/worlds/alttp/test/inverted_minor_glitches/TestInvertedMinor.py b/worlds/alttp/test/inverted_minor_glitches/TestInvertedMinor.py index 912cca4390c3..029de39bc232 100644 --- a/worlds/alttp/test/inverted_minor_glitches/TestInvertedMinor.py +++ b/worlds/alttp/test/inverted_minor_glitches/TestInvertedMinor.py @@ -18,13 +18,12 @@ def setUp(self): self.multiworld.glitches_required[1] = GlitchesRequired.from_any("minor_glitches") self.multiworld.bombless_start[1].value = True self.multiworld.shuffle_capacity_upgrades[1].value = True - self.multiworld.difficulty_requirements[1] = difficulties['normal'] + self.multiworld.worlds[1].difficulty_requirements = difficulties['normal'] create_inverted_regions(self.multiworld, 1) self.world.create_dungeons() create_shops(self.multiworld, 1) link_inverted_entrances(self.multiworld, 1) self.world.create_items() - self.multiworld.required_medallions[1] = ['Ether', 'Quake'] self.multiworld.itempool.extend(get_dungeon_item_pool(self.multiworld)) self.multiworld.itempool.extend(item_factory(['Green Pendant', 'Red Pendant', 'Blue Pendant', 'Beat Agahnim 1', 'Beat Agahnim 2', 'Crystal 1', 'Crystal 2', 'Crystal 3', 'Crystal 4', 'Crystal 5', 'Crystal 6', 'Crystal 7'], self.world)) self.multiworld.get_location('Agahnim 1', 1).item = None diff --git a/worlds/alttp/test/inverted_owg/TestInvertedOWG.py b/worlds/alttp/test/inverted_owg/TestInvertedOWG.py index fc38437e3ed7..86afae3e2a67 100644 --- a/worlds/alttp/test/inverted_owg/TestInvertedOWG.py +++ b/worlds/alttp/test/inverted_owg/TestInvertedOWG.py @@ -18,13 +18,12 @@ def setUp(self): self.multiworld.mode[1].value = 2 self.multiworld.bombless_start[1].value = True self.multiworld.shuffle_capacity_upgrades[1].value = True - self.multiworld.difficulty_requirements[1] = difficulties['normal'] + self.multiworld.worlds[1].difficulty_requirements = difficulties['normal'] create_inverted_regions(self.multiworld, 1) self.world.create_dungeons() create_shops(self.multiworld, 1) link_inverted_entrances(self.multiworld, 1) self.world.create_items() - self.multiworld.required_medallions[1] = ['Ether', 'Quake'] self.multiworld.itempool.extend(get_dungeon_item_pool(self.multiworld)) self.multiworld.itempool.extend(item_factory(['Green Pendant', 'Red Pendant', 'Blue Pendant', 'Beat Agahnim 1', 'Beat Agahnim 2', 'Crystal 1', 'Crystal 2', 'Crystal 3', 'Crystal 4', 'Crystal 5', 'Crystal 6', 'Crystal 7'], self.world)) self.multiworld.get_location('Agahnim 1', 1).item = None diff --git a/worlds/alttp/test/minor_glitches/TestMinor.py b/worlds/alttp/test/minor_glitches/TestMinor.py index a7b529382e5e..55fef61ebf99 100644 --- a/worlds/alttp/test/minor_glitches/TestMinor.py +++ b/worlds/alttp/test/minor_glitches/TestMinor.py @@ -14,11 +14,10 @@ def setUp(self): self.multiworld.glitches_required[1] = GlitchesRequired.from_any("minor_glitches") self.multiworld.bombless_start[1].value = True self.multiworld.shuffle_capacity_upgrades[1].value = True - self.multiworld.difficulty_requirements[1] = difficulties['normal'] + self.multiworld.worlds[1].difficulty_requirements = difficulties['normal'] self.world.er_seed = 0 self.world.create_regions() self.world.create_items() - self.multiworld.required_medallions[1] = ['Ether', 'Quake'] self.multiworld.itempool.extend(get_dungeon_item_pool(self.multiworld)) self.multiworld.itempool.extend(item_factory( ['Green Pendant', 'Red Pendant', 'Blue Pendant', 'Beat Agahnim 1', 'Beat Agahnim 2', 'Crystal 1', diff --git a/worlds/alttp/test/owg/TestVanillaOWG.py b/worlds/alttp/test/owg/TestVanillaOWG.py index 3506154587e7..61b528f6fb91 100644 --- a/worlds/alttp/test/owg/TestVanillaOWG.py +++ b/worlds/alttp/test/owg/TestVanillaOWG.py @@ -11,14 +11,13 @@ class TestVanillaOWG(TestBase, LTTPTestBase): def setUp(self): self.world_setup() - self.multiworld.difficulty_requirements[1] = difficulties['normal'] + self.multiworld.worlds[1].difficulty_requirements = difficulties['normal'] self.multiworld.glitches_required[1] = GlitchesRequired.from_any("overworld_glitches") self.multiworld.bombless_start[1].value = True self.multiworld.shuffle_capacity_upgrades[1].value = True self.multiworld.worlds[1].er_seed = 0 self.multiworld.worlds[1].create_regions() self.multiworld.worlds[1].create_items() - self.multiworld.required_medallions[1] = ['Ether', 'Quake'] self.multiworld.itempool.extend(get_dungeon_item_pool(self.multiworld)) self.multiworld.itempool.extend(item_factory(['Green Pendant', 'Red Pendant', 'Blue Pendant', 'Beat Agahnim 1', 'Beat Agahnim 2', 'Crystal 1', 'Crystal 2', 'Crystal 3', 'Crystal 4', 'Crystal 5', 'Crystal 6', 'Crystal 7'], self.world)) self.multiworld.get_location('Agahnim 1', 1).item = None diff --git a/worlds/alttp/test/vanilla/TestVanilla.py b/worlds/alttp/test/vanilla/TestVanilla.py index 5865ddf9873d..496b2ba0f9ac 100644 --- a/worlds/alttp/test/vanilla/TestVanilla.py +++ b/worlds/alttp/test/vanilla/TestVanilla.py @@ -11,13 +11,12 @@ class TestVanilla(TestBase, LTTPTestBase): def setUp(self): self.world_setup() self.multiworld.glitches_required[1] = GlitchesRequired.from_any("no_glitches") - self.multiworld.difficulty_requirements[1] = difficulties['normal'] + self.multiworld.worlds[1].difficulty_requirements = difficulties['normal'] self.multiworld.bombless_start[1].value = True self.multiworld.shuffle_capacity_upgrades[1].value = True self.multiworld.worlds[1].er_seed = 0 self.multiworld.worlds[1].create_regions() self.multiworld.worlds[1].create_items() - self.multiworld.required_medallions[1] = ['Ether', 'Quake'] self.multiworld.itempool.extend(get_dungeon_item_pool(self.multiworld)) self.multiworld.itempool.extend(item_factory(['Green Pendant', 'Red Pendant', 'Blue Pendant', 'Beat Agahnim 1', 'Beat Agahnim 2', 'Crystal 1', 'Crystal 2', 'Crystal 3', 'Crystal 4', 'Crystal 5', 'Crystal 6', 'Crystal 7'], self.world)) self.multiworld.get_location('Agahnim 1', 1).item = None From 52c1b04fc82b88569db7c479bd001d0b5801f409 Mon Sep 17 00:00:00 2001 From: el-u <109771707+el-u@users.noreply.github.com> Date: Thu, 18 Apr 2024 18:34:26 +0200 Subject: [PATCH 062/153] lufia2ac: prevent 0 byte reads (#3168) --- worlds/lufia2ac/Client.py | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) diff --git a/worlds/lufia2ac/Client.py b/worlds/lufia2ac/Client.py index 9025a1137b98..3c05e6395d90 100644 --- a/worlds/lufia2ac/Client.py +++ b/worlds/lufia2ac/Client.py @@ -118,10 +118,11 @@ async def game_watcher(self, ctx: SNIContext) -> None: snes_buffered_write(ctx, L2AC_TX_ADDR + 8, total_blue_chests_checked.to_bytes(2, "little")) location_ids: List[int] = [locations_start_id + i for i in range(total_blue_chests_checked)] - loc_data: Optional[bytes] = await snes_read(ctx, L2AC_TX_ADDR + 32, snes_other_locations_checked * 2) - if loc_data is not None: - location_ids.extend(locations_start_id + int.from_bytes(loc_data[2 * i:2 * i + 2], "little") - for i in range(snes_other_locations_checked)) + if snes_other_locations_checked: + loc_data: Optional[bytes] = await snes_read(ctx, L2AC_TX_ADDR + 32, snes_other_locations_checked * 2) + if loc_data is not None: + location_ids.extend(locations_start_id + int.from_bytes(loc_data[2 * i:2 * i + 2], "little") + for i in range(snes_other_locations_checked)) if new_location_ids := [loc_id for loc_id in location_ids if loc_id not in ctx.locations_checked]: await ctx.send_msgs([{"cmd": "LocationChecks", "locations": new_location_ids}]) From 7fd7d5e492b1bcf8421db096ab81f540299218e5 Mon Sep 17 00:00:00 2001 From: Scipio Wright Date: Thu, 18 Apr 2024 12:34:57 -0400 Subject: [PATCH 063/153] Noita: Add the new bosses to the check pool (#3170) --- worlds/noita/locations.py | 9 ++++++++- worlds/noita/options.py | 2 +- worlds/noita/regions.py | 6 +++--- 3 files changed, 12 insertions(+), 5 deletions(-) diff --git a/worlds/noita/locations.py b/worlds/noita/locations.py index cf91ba44fb7a..01801b158509 100644 --- a/worlds/noita/locations.py +++ b/worlds/noita/locations.py @@ -26,7 +26,7 @@ class LocationFlag(IntEnum): # Mapping of items in each region. # Only the first Hidden Chest and Pedestal are mapped here, the others are created in Regions. # ltype key: "chest" = Hidden Chests, "pedestal" = Pedestals, "boss" = Boss, "orb" = Orb. -# 110000-110649 +# 110000-110671 location_region_mapping: Dict[str, Dict[str, LocationData]] = { "Coal Pits Holy Mountain": { "Coal Pits Holy Mountain Shop Item 1": LocationData(110000), @@ -90,6 +90,9 @@ class LocationFlag(IntEnum): "Secret Shop Item 3": LocationData(110044), "Secret Shop Item 4": LocationData(110045), }, + "The Sky": { + "Kivi": LocationData(110670, LocationFlag.main_world, "boss"), + }, "Floating Island": { "Floating Island Orb": LocationData(110658, LocationFlag.main_path, "orb"), }, @@ -104,6 +107,7 @@ class LocationFlag(IntEnum): }, "Lake": { "Syväolento": LocationData(110651, LocationFlag.main_world, "boss"), + "Tapion vasalli": LocationData(110669, LocationFlag.main_world, "boss"), }, "Frozen Vault": { "Frozen Vault Orb": LocationData(110660, LocationFlag.main_world, "orb"), @@ -189,6 +193,9 @@ class LocationFlag(IntEnum): "Deep Underground": { "Limatoukka": LocationData(110647, LocationFlag.main_world, "boss"), }, + "West Meat Realm": { + "Kolmisilmän sydän": LocationData(110671, LocationFlag.main_world, "boss"), + }, "The Laboratory": { "Kolmisilmä": LocationData(110646, LocationFlag.main_path, "boss"), }, diff --git a/worlds/noita/options.py b/worlds/noita/options.py index 2c99e9dd2f38..3600c0ca163e 100644 --- a/worlds/noita/options.py +++ b/worlds/noita/options.py @@ -53,7 +53,7 @@ class BossesAsChecks(Choice): """Makes bosses count as location checks. The boss only needs to die, you do not need the kill credit. The Main Path option includes Gate Guardian, Suomuhauki, and Kolmisilmä. The Side Path option includes the Main Path bosses, Sauvojen Tuntija, and Ylialkemisti. - The All Bosses option includes all 12 bosses.""" + The All Bosses option includes all 15 bosses.""" display_name = "Bosses as Location Checks" option_no_bosses = 0 option_main_path = 1 diff --git a/worlds/noita/regions.py b/worlds/noita/regions.py index 3b7fd3962c89..8ea8a41e85f6 100644 --- a/worlds/noita/regions.py +++ b/worlds/noita/regions.py @@ -72,7 +72,7 @@ def create_all_regions_and_connections(world: "NoitaWorld") -> None: # - Snow Chasm is disconnected from the Snowy Wasteland # - Pyramid is connected to the Hiisi Base instead of the Desert due to similar difficulty # - Frozen Vault is connected to the Vault instead of the Snowy Wasteland due to similar difficulty -# - Lake is connected to The Laboratory, since the boss is hard without specific set-ups (which means late game) +# - Lake is connected to The Laboratory, since the bosses are hard without specific set-ups (which means late game) # - Snowy Depths connects to Lava Lake orb since you need digging for it, so fairly early is acceptable # - Ancient Laboratory is connected to the Coal Pits, so that Ylialkemisti isn't sphere 1 noita_connections: Dict[str, List[str]] = { @@ -99,7 +99,7 @@ def create_all_regions_and_connections(world: "NoitaWorld") -> None: ### "Underground Jungle Holy Mountain": ["Underground Jungle"], - "Underground Jungle": ["Dragoncave", "Overgrown Cavern", "Vault Holy Mountain", "Lukki Lair", "Snow Chasm"], + "Underground Jungle": ["Dragoncave", "Overgrown Cavern", "Vault Holy Mountain", "Lukki Lair", "Snow Chasm", "West Meat Realm"], ### "Vault Holy Mountain": ["The Vault"], @@ -113,7 +113,7 @@ def create_all_regions_and_connections(world: "NoitaWorld") -> None: ### "Laboratory Holy Mountain": ["The Laboratory"], - "The Laboratory": ["The Work", "Friend Cave", "The Work (Hell)", "Lake"], + "The Laboratory": ["The Work", "Friend Cave", "The Work (Hell)", "Lake", "The Sky"], ### } From 437843bf534038d20962159f803acc89e5d92dbf Mon Sep 17 00:00:00 2001 From: LiquidCat64 <74896918+LiquidCat64@users.noreply.github.com> Date: Thu, 18 Apr 2024 10:37:51 -0600 Subject: [PATCH 064/153] CV64: Use AP Procedure Patch (#3159) --- worlds/cv64/__init__.py | 27 +- worlds/cv64/aesthetics.py | 303 +++-- worlds/cv64/data/patches.py | 21 +- worlds/cv64/docs/obscure_checks.md | 2 +- worlds/cv64/options.py | 6 +- worlds/cv64/rom.py | 1761 +++++++++++++++------------- worlds/cv64/stages.py | 76 +- 7 files changed, 1126 insertions(+), 1070 deletions(-) diff --git a/worlds/cv64/__init__.py b/worlds/cv64/__init__.py index 1f528feac22f..2bceefee0ed0 100644 --- a/worlds/cv64/__init__.py +++ b/worlds/cv64/__init__.py @@ -4,7 +4,7 @@ import base64 import logging -from BaseClasses import Item, Region, MultiWorld, Tutorial, ItemClassification +from BaseClasses import Item, Region, Tutorial, ItemClassification from .items import CV64Item, filler_item_names, get_item_info, get_item_names_to_ids, get_item_counts from .locations import CV64Location, get_location_info, verify_locations, get_location_names_to_ids, base_id from .entrances import verify_entrances, get_warp_entrances @@ -18,7 +18,7 @@ from .aesthetics import randomize_lighting, shuffle_sub_weapons, rom_empty_breakables_flags, rom_sub_weapon_flags, \ randomize_music, get_start_inventory_data, get_location_data, randomize_shop_prices, get_loading_zone_bytes, \ get_countdown_numbers -from .rom import LocalRom, patch_rom, get_base_rom_path, CV64DeltaPatch +from .rom import RomData, write_patch, get_base_rom_path, CV64ProcedurePatch, CV64_US_10_HASH from .client import Castlevania64Client @@ -27,7 +27,7 @@ class RomFile(settings.UserFilePath): """File name of the CV64 US 1.0 rom""" copy_to = "Castlevania (USA).z64" description = "CV64 (US 1.0) ROM File" - md5s = [CV64DeltaPatch.hash] + md5s = [CV64_US_10_HASH] rom_file: RomFile = RomFile(RomFile.copy_to) @@ -86,12 +86,6 @@ class CV64World(World): web = CV64Web() - @classmethod - def stage_assert_generate(cls, multiworld: MultiWorld) -> None: - rom_file = get_base_rom_path() - if not os.path.exists(rom_file): - raise FileNotFoundError(rom_file) - def generate_early(self) -> None: # Generate the player's unique authentication self.auth = bytearray(self.multiworld.random.getrandbits(8) for _ in range(16)) @@ -276,18 +270,13 @@ def generate_output(self, output_directory: str) -> None: offset_data.update(get_start_inventory_data(self.player, self.options, self.multiworld.precollected_items[self.player])) - cv64_rom = LocalRom(get_base_rom_path()) - - rompath = os.path.join(output_directory, f"{self.multiworld.get_out_file_name_base(self.player)}.z64") - - patch_rom(self, cv64_rom, offset_data, shop_name_list, shop_desc_list, shop_colors_list, active_locations) + patch = CV64ProcedurePatch() + write_patch(self, patch, offset_data, shop_name_list, shop_desc_list, shop_colors_list, active_locations) - cv64_rom.write_to_file(rompath) + rom_path = os.path.join(output_directory, f"{self.multiworld.get_out_file_name_base(self.player)}" + f"{patch.patch_file_ending}") - patch = CV64DeltaPatch(os.path.splitext(rompath)[0] + CV64DeltaPatch.patch_file_ending, player=self.player, - player_name=self.multiworld.player_name[self.player], patched_path=rompath) - patch.write() - os.unlink(rompath) + patch.write(rom_path) def get_filler_item_name(self) -> str: return self.random.choice(filler_item_names) diff --git a/worlds/cv64/aesthetics.py b/worlds/cv64/aesthetics.py index cbf2728c8298..66709174d837 100644 --- a/worlds/cv64/aesthetics.py +++ b/worlds/cv64/aesthetics.py @@ -14,111 +14,111 @@ from . import CV64World rom_sub_weapon_offsets = { - 0x10C6EB: (0x10, rname.forest_of_silence), # Forest - 0x10C6F3: (0x0F, rname.forest_of_silence), - 0x10C6FB: (0x0E, rname.forest_of_silence), - 0x10C703: (0x0D, rname.forest_of_silence), - - 0x10C81F: (0x0F, rname.castle_wall), # Castle Wall - 0x10C827: (0x10, rname.castle_wall), - 0x10C82F: (0x0E, rname.castle_wall), - 0x7F9A0F: (0x0D, rname.castle_wall), - - 0x83A5D9: (0x0E, rname.villa), # Villa - 0x83A5E5: (0x0D, rname.villa), - 0x83A5F1: (0x0F, rname.villa), - 0xBFC903: (0x10, rname.villa), - 0x10C987: (0x10, rname.villa), - 0x10C98F: (0x0D, rname.villa), - 0x10C997: (0x0F, rname.villa), - 0x10CF73: (0x10, rname.villa), - - 0x10CA57: (0x0D, rname.tunnel), # Tunnel - 0x10CA5F: (0x0E, rname.tunnel), - 0x10CA67: (0x10, rname.tunnel), - 0x10CA6F: (0x0D, rname.tunnel), - 0x10CA77: (0x0F, rname.tunnel), - 0x10CA7F: (0x0E, rname.tunnel), - - 0x10CBC7: (0x0E, rname.castle_center), # Castle Center - 0x10CC0F: (0x0D, rname.castle_center), - 0x10CC5B: (0x0F, rname.castle_center), - - 0x10CD3F: (0x0E, rname.tower_of_execution), # Character towers - 0x10CD65: (0x0D, rname.tower_of_execution), - 0x10CE2B: (0x0E, rname.tower_of_science), - 0x10CE83: (0x10, rname.duel_tower), - - 0x10CF8B: (0x0F, rname.room_of_clocks), # Room of Clocks - 0x10CF93: (0x0D, rname.room_of_clocks), - - 0x99BC5A: (0x0D, rname.clock_tower), # Clock Tower - 0x10CECB: (0x10, rname.clock_tower), - 0x10CED3: (0x0F, rname.clock_tower), - 0x10CEDB: (0x0E, rname.clock_tower), - 0x10CEE3: (0x0D, rname.clock_tower), + 0x10C6EB: (b"\x10", rname.forest_of_silence), # Forest + 0x10C6F3: (b"\x0F", rname.forest_of_silence), + 0x10C6FB: (b"\x0E", rname.forest_of_silence), + 0x10C703: (b"\x0D", rname.forest_of_silence), + + 0x10C81F: (b"\x0F", rname.castle_wall), # Castle Wall + 0x10C827: (b"\x10", rname.castle_wall), + 0x10C82F: (b"\x0E", rname.castle_wall), + 0x7F9A0F: (b"\x0D", rname.castle_wall), + + 0x83A5D9: (b"\x0E", rname.villa), # Villa + 0x83A5E5: (b"\x0D", rname.villa), + 0x83A5F1: (b"\x0F", rname.villa), + 0xBFC903: (b"\x10", rname.villa), + 0x10C987: (b"\x10", rname.villa), + 0x10C98F: (b"\x0D", rname.villa), + 0x10C997: (b"\x0F", rname.villa), + 0x10CF73: (b"\x10", rname.villa), + + 0x10CA57: (b"\x0D", rname.tunnel), # Tunnel + 0x10CA5F: (b"\x0E", rname.tunnel), + 0x10CA67: (b"\x10", rname.tunnel), + 0x10CA6F: (b"\x0D", rname.tunnel), + 0x10CA77: (b"\x0F", rname.tunnel), + 0x10CA7F: (b"\x0E", rname.tunnel), + + 0x10CBC7: (b"\x0E", rname.castle_center), # Castle Center + 0x10CC0F: (b"\x0D", rname.castle_center), + 0x10CC5B: (b"\x0F", rname.castle_center), + + 0x10CD3F: (b"\x0E", rname.tower_of_execution), # Character towers + 0x10CD65: (b"\x0D", rname.tower_of_execution), + 0x10CE2B: (b"\x0E", rname.tower_of_science), + 0x10CE83: (b"\x10", rname.duel_tower), + + 0x10CF8B: (b"\x0F", rname.room_of_clocks), # Room of Clocks + 0x10CF93: (b"\x0D", rname.room_of_clocks), + + 0x99BC5A: (b"\x0D", rname.clock_tower), # Clock Tower + 0x10CECB: (b"\x10", rname.clock_tower), + 0x10CED3: (b"\x0F", rname.clock_tower), + 0x10CEDB: (b"\x0E", rname.clock_tower), + 0x10CEE3: (b"\x0D", rname.clock_tower), } rom_sub_weapon_flags = { - 0x10C6EC: 0x0200FF04, # Forest of Silence - 0x10C6FC: 0x0400FF04, - 0x10C6F4: 0x0800FF04, - 0x10C704: 0x4000FF04, + 0x10C6EC: b"\x02\x00\xFF\x04", # Forest of Silence + 0x10C6FC: b"\x04\x00\xFF\x04", + 0x10C6F4: b"\x08\x00\xFF\x04", + 0x10C704: b"\x40\x00\xFF\x04", - 0x10C831: 0x08, # Castle Wall - 0x10C829: 0x10, - 0x10C821: 0x20, - 0xBFCA97: 0x04, + 0x10C831: b"\x08", # Castle Wall + 0x10C829: b"\x10", + 0x10C821: b"\x20", + 0xBFCA97: b"\x04", # Villa - 0xBFC926: 0xFF04, - 0xBFC93A: 0x80, - 0xBFC93F: 0x01, - 0xBFC943: 0x40, - 0xBFC947: 0x80, - 0x10C989: 0x10, - 0x10C991: 0x20, - 0x10C999: 0x40, - 0x10CF77: 0x80, - - 0x10CA58: 0x4000FF0E, # Tunnel - 0x10CA6B: 0x80, - 0x10CA60: 0x1000FF05, - 0x10CA70: 0x2000FF05, - 0x10CA78: 0x4000FF05, - 0x10CA80: 0x8000FF05, - - 0x10CBCA: 0x02, # Castle Center - 0x10CC10: 0x80, - 0x10CC5C: 0x40, - - 0x10CE86: 0x01, # Duel Tower - 0x10CD43: 0x02, # Tower of Execution - 0x10CE2E: 0x20, # Tower of Science - - 0x10CF8E: 0x04, # Room of Clocks - 0x10CF96: 0x08, - - 0x10CECE: 0x08, # Clock Tower - 0x10CED6: 0x10, - 0x10CEE6: 0x20, - 0x10CEDE: 0x80, + 0xBFC926: b"\xFF\x04", + 0xBFC93A: b"\x80", + 0xBFC93F: b"\x01", + 0xBFC943: b"\x40", + 0xBFC947: b"\x80", + 0x10C989: b"\x10", + 0x10C991: b"\x20", + 0x10C999: b"\x40", + 0x10CF77: b"\x80", + + 0x10CA58: b"\x40\x00\xFF\x0E", # Tunnel + 0x10CA6B: b"\x80", + 0x10CA60: b"\x10\x00\xFF\x05", + 0x10CA70: b"\x20\x00\xFF\x05", + 0x10CA78: b"\x40\x00\xFF\x05", + 0x10CA80: b"\x80\x00\xFF\x05", + + 0x10CBCA: b"\x02", # Castle Center + 0x10CC10: b"\x80", + 0x10CC5C: b"\x40", + + 0x10CE86: b"\x01", # Duel Tower + 0x10CD43: b"\x02", # Tower of Execution + 0x10CE2E: b"\x20", # Tower of Science + + 0x10CF8E: b"\x04", # Room of Clocks + 0x10CF96: b"\x08", + + 0x10CECE: b"\x08", # Clock Tower + 0x10CED6: b"\x10", + 0x10CEE6: b"\x20", + 0x10CEDE: b"\x80", } rom_empty_breakables_flags = { - 0x10C74D: 0x40FF05, # Forest of Silence - 0x10C765: 0x20FF0E, - 0x10C774: 0x0800FF0E, - 0x10C755: 0x80FF05, - 0x10C784: 0x0100FF0E, - 0x10C73C: 0x0200FF0E, - - 0x10C8D0: 0x0400FF0E, # Villa foyer - - 0x10CF9F: 0x08, # Room of Clocks flags - 0x10CFA7: 0x01, - 0xBFCB6F: 0x04, # Room of Clocks candle property IDs - 0xBFCB73: 0x05, + 0x10C74D: b"\x40\xFF\x05", # Forest of Silence + 0x10C765: b"\x20\xFF\x0E", + 0x10C774: b"\x08\x00\xFF\x0E", + 0x10C755: b"\x80\xFF\x05", + 0x10C784: b"\x01\x00\xFF\x0E", + 0x10C73C: b"\x02\x00\xFF\x0E", + + 0x10C8D0: b"\x04\x00\xFF\x0E", # Villa foyer + + 0x10CF9F: b"\x08", # Room of Clocks flags + 0x10CFA7: b"\x01", + 0xBFCB6F: b"\x04", # Room of Clocks candle property IDs + 0xBFCB73: b"\x05", } rom_axe_cross_lower_values = { @@ -269,19 +269,18 @@ } -def randomize_lighting(world: "CV64World") -> Dict[int, int]: +def randomize_lighting(world: "CV64World") -> Dict[int, bytes]: """Generates randomized data for the map lighting table.""" randomized_lighting = {} for entry in range(67): for sub_entry in range(19): if sub_entry not in [3, 7, 11, 15] and entry != 4: # The fourth entry in the lighting table affects the lighting on some item pickups; skip it - randomized_lighting[0x1091A0 + (entry * 28) + sub_entry] = \ - world.random.randint(0, 255) + randomized_lighting[0x1091A0 + (entry * 28) + sub_entry] = bytes([world.random.randint(0, 255)]) return randomized_lighting -def shuffle_sub_weapons(world: "CV64World") -> Dict[int, int]: +def shuffle_sub_weapons(world: "CV64World") -> Dict[int, bytes]: """Shuffles the sub-weapons amongst themselves.""" sub_weapon_dict = {offset: rom_sub_weapon_offsets[offset][0] for offset in rom_sub_weapon_offsets if rom_sub_weapon_offsets[offset][1] in world.active_stage_exits} @@ -295,7 +294,7 @@ def shuffle_sub_weapons(world: "CV64World") -> Dict[int, int]: return dict(zip(sub_weapon_dict, sub_bytes)) -def randomize_music(world: "CV64World") -> Dict[int, int]: +def randomize_music(world: "CV64World") -> Dict[int, bytes]: """Generates randomized or disabled data for all the music in the game.""" music_array = bytearray(0x7A) for number in music_sfx_ids: @@ -340,15 +339,10 @@ def randomize_music(world: "CV64World") -> Dict[int, int]: music_array[i] = fade_in_songs[i] del (music_array[0x00: 0x10]) - # Convert the music array into a data dict - music_offsets = {} - for i in range(len(music_array)): - music_offsets[0xBFCD30 + i] = music_array[i] + return {0xBFCD30: bytes(music_array)} - return music_offsets - -def randomize_shop_prices(world: "CV64World") -> Dict[int, int]: +def randomize_shop_prices(world: "CV64World") -> Dict[int, bytes]: """Randomize the shop prices based on the minimum and maximum values chosen. The minimum price will adjust if it's higher than the max.""" min_price = world.options.minimum_gold_price.value @@ -363,21 +357,15 @@ def randomize_shop_prices(world: "CV64World") -> Dict[int, int]: shop_price_list = [world.random.randint(min_price * 100, max_price * 100) for _ in range(7)] - # Convert the price list into a data dict. Which offset it starts from depends on how many bytes it takes up. + # Convert the price list into a data dict. price_dict = {} for i in range(len(shop_price_list)): - if shop_price_list[i] <= 0xFF: - price_dict[0x103D6E + (i*12)] = 0 - price_dict[0x103D6F + (i*12)] = shop_price_list[i] - elif shop_price_list[i] <= 0xFFFF: - price_dict[0x103D6E + (i*12)] = shop_price_list[i] - else: - price_dict[0x103D6D + (i*12)] = shop_price_list[i] + price_dict[0x103D6C + (i * 12)] = int.to_bytes(shop_price_list[i], 4, "big") return price_dict -def get_countdown_numbers(options: CV64Options, active_locations: Iterable[Location]) -> Dict[int, int]: +def get_countdown_numbers(options: CV64Options, active_locations: Iterable[Location]) -> Dict[int, bytes]: """Figures out which Countdown numbers to increase for each Location after verifying the Item on the Location should increase a number. @@ -400,16 +388,11 @@ def get_countdown_numbers(options: CV64Options, active_locations: Iterable[Locat if countdown_number is not None: countdown_list[countdown_number] += 1 - # Convert the Countdown list into a data dict - countdown_dict = {} - for i in range(len(countdown_list)): - countdown_dict[0xBFD818 + i] = countdown_list[i] - - return countdown_dict + return {0xBFD818: bytes(countdown_list)} def get_location_data(world: "CV64World", active_locations: Iterable[Location]) \ - -> Tuple[Dict[int, int], List[str], List[bytearray], List[List[Union[int, str, None]]]]: + -> Tuple[Dict[int, bytes], List[str], List[bytearray], List[List[Union[int, str, None]]]]: """Gets ALL the item data to go into the ROM. Item data consists of two bytes: the first dictates the appearance of the item, the second determines what the item actually is when picked up. All items from other worlds will be AP items that do nothing when picked up other than set their flag, and their appearance will depend on whether it's @@ -449,12 +432,11 @@ def get_location_data(world: "CV64World", active_locations: Iterable[Location]) # Figure out the item ID bytes to put in each Location here. Write the item itself if either it's the player's # very own, or it belongs to an Item Link that the player is a part of. - if loc.item.player == world.player or (loc.item.player in world.multiworld.groups and - world.player in world.multiworld.groups[loc.item.player]['players']): + if loc.item.player == world.player: if loc_type not in ["npc", "shop"] and get_item_info(loc.item.name, "pickup actor id") is not None: location_bytes[get_location_info(loc.name, "offset")] = get_item_info(loc.item.name, "pickup actor id") else: - location_bytes[get_location_info(loc.name, "offset")] = get_item_info(loc.item.name, "code") + location_bytes[get_location_info(loc.name, "offset")] = get_item_info(loc.item.name, "code") & 0xFF else: # Make the item the unused Wooden Stake - our multiworld item. location_bytes[get_location_info(loc.name, "offset")] = 0x11 @@ -534,11 +516,12 @@ def get_location_data(world: "CV64World", active_locations: Iterable[Location]) shop_colors_list.append(get_item_text_color(loc)) - return location_bytes, shop_name_list, shop_colors_list, shop_desc_list + return {offset: int.to_bytes(byte, 1, "big") for offset, byte in location_bytes.items()}, shop_name_list,\ + shop_colors_list, shop_desc_list def get_loading_zone_bytes(options: CV64Options, starting_stage: str, - active_stage_exits: Dict[str, Dict[str, Union[str, int, None]]]) -> Dict[int, int]: + active_stage_exits: Dict[str, Dict[str, Union[str, int, None]]]) -> Dict[int, bytes]: """Figure out all the bytes for loading zones and map transitions based on which stages are where in the exit data. The same data was used earlier in figuring out the logic. Map transitions consist of two major components: which map to send the player to, and which spot within the map to spawn the player at.""" @@ -551,8 +534,8 @@ def get_loading_zone_bytes(options: CV64Options, starting_stage: str, # Start loading zones # If the start zone is the start of the line, have it simply refresh the map. if active_stage_exits[stage]["prev"] == "Menu": - loading_zone_bytes[get_stage_info(stage, "startzone map offset")] = 0xFF - loading_zone_bytes[get_stage_info(stage, "startzone spawn offset")] = 0x00 + loading_zone_bytes[get_stage_info(stage, "startzone map offset")] = b"\xFF" + loading_zone_bytes[get_stage_info(stage, "startzone spawn offset")] = b"\x00" elif active_stage_exits[stage]["prev"]: loading_zone_bytes[get_stage_info(stage, "startzone map offset")] = \ get_stage_info(active_stage_exits[stage]["prev"], "end map id") @@ -563,7 +546,7 @@ def get_loading_zone_bytes(options: CV64Options, starting_stage: str, if active_stage_exits[stage]["prev"] == rname.castle_center: if options.character_stages == CharacterStages.option_carrie_only or \ active_stage_exits[rname.castle_center]["alt"] == stage: - loading_zone_bytes[get_stage_info(stage, "startzone spawn offset")] += 1 + loading_zone_bytes[get_stage_info(stage, "startzone spawn offset")] = b"\x03" # End loading zones if active_stage_exits[stage]["next"]: @@ -582,16 +565,16 @@ def get_loading_zone_bytes(options: CV64Options, starting_stage: str, return loading_zone_bytes -def get_start_inventory_data(player: int, options: CV64Options, precollected_items: List[Item]) -> Dict[int, int]: +def get_start_inventory_data(player: int, options: CV64Options, precollected_items: List[Item]) -> Dict[int, bytes]: """Calculate and return the starting inventory values. Not every Item goes into the menu inventory, so everything has to be handled appropriately.""" - start_inventory_data = {0xBFD867: 0, # Jewels - 0xBFD87B: 0, # PowerUps - 0xBFD883: 0, # Sub-weapon - 0xBFD88B: 0} # Ice Traps + start_inventory_data = {} inventory_items_array = [0 for _ in range(35)] total_money = 0 + total_jewels = 0 + total_powerups = 0 + total_ice_traps = 0 items_max = 10 @@ -615,42 +598,46 @@ def get_start_inventory_data(player: int, options: CV64Options, precollected_ite inventory_items_array[inventory_offset] = 2 # Starting sub-weapon elif sub_equip_id is not None: - start_inventory_data[0xBFD883] = sub_equip_id + start_inventory_data[0xBFD883] = bytes(sub_equip_id) # Starting PowerUps elif item.name == iname.powerup: - start_inventory_data[0xBFD87B] += 1 - if start_inventory_data[0xBFD87B] > 2: - start_inventory_data[0xBFD87B] = 2 + total_powerups += 1 + # Can't have more than 2 PowerUps. + if total_powerups > 2: + total_powerups = 2 # Starting Gold elif "GOLD" in item.name: total_money += int(item.name[0:4]) + # Money cannot be higher than 99999. if total_money > 99999: total_money = 99999 # Starting Jewels elif "jewel" in item.name: if "L" in item.name: - start_inventory_data[0xBFD867] += 10 + total_jewels += 10 else: - start_inventory_data[0xBFD867] += 5 - if start_inventory_data[0xBFD867] > 99: - start_inventory_data[0xBFD867] = 99 + total_jewels += 5 + # Jewels cannot be higher than 99. + if total_jewels > 99: + total_jewels = 99 # Starting Ice Traps else: - start_inventory_data[0xBFD88B] += 1 - if start_inventory_data[0xBFD88B] > 0xFF: - start_inventory_data[0xBFD88B] = 0xFF + total_ice_traps += 1 + # Ice Traps cannot be higher than 255. + if total_ice_traps > 0xFF: + total_ice_traps = 0xFF + + # Convert the jewels into data. + start_inventory_data[0xBFD867] = bytes([total_jewels]) + + # Convert the Ice Traps into data. + start_inventory_data[0xBFD88B] = bytes([total_ice_traps]) # Convert the inventory items into data. - for i in range(len(inventory_items_array)): - start_inventory_data[0xBFE518 + i] = inventory_items_array[i] - - # Convert the starting money into data. Which offset it starts from depends on how many bytes it takes up. - if total_money <= 0xFF: - start_inventory_data[0xBFE517] = total_money - elif total_money <= 0xFFFF: - start_inventory_data[0xBFE516] = total_money - else: - start_inventory_data[0xBFE515] = total_money + start_inventory_data[0xBFE518] = bytes(inventory_items_array) + + # Convert the starting money into data. + start_inventory_data[0xBFE514] = int.to_bytes(total_money, 4, "big") return start_inventory_data diff --git a/worlds/cv64/data/patches.py b/worlds/cv64/data/patches.py index 4c4670363831..938b615b3213 100644 --- a/worlds/cv64/data/patches.py +++ b/worlds/cv64/data/patches.py @@ -197,12 +197,15 @@ 0xA168FFFD, # SB T0, 0xFFFD (T3) ] -nitro_fall_killer = [ - # Custom code to force the instant fall death if at a high enough falling speed after getting killed by the Nitro - # explosion, since the game doesn't run the checks for the fall death after getting hit by said explosion and could - # result in a softlock when getting blown into an abyss. +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 + # that would trigger the fall death after you get killed by some other means, which could result in a softlock + # when a killing blow launches you into an abyss. 0x3C0C8035, # LUI T4, 0x8035 0x918807E2, # LBU T0, 0x07E2 (T4) + 0x24090008, # ADDIU T1, R0, 0x0008 + 0x11090002, # BEQ T0, T1, [forward 0x02] 0x2409000C, # ADDIU T1, R0, 0x000C 0x15090006, # BNE T0, T1, [forward 0x06] 0x3C098035, # LUI T1, 0x8035 @@ -2863,3 +2866,13 @@ 0xAD000814, # SW R0, 0x0814 (T0) 0x03200008 # JR T9 ] + +dog_bite_ice_trap_fix = [ + # Sets the freeze timer to 0 when a maze garden dog bites the player to ensure the ice chunk model will break if the + # player gets bitten while frozen via Ice Trap. + 0x3C088039, # LUI T0, 0x8039 + 0xA5009E76, # SH R0, 0x9E76 (T0) + 0x3C090F00, # LUI T1, 0x0F00 + 0x25291CB8, # ADDIU T1, T1, 0x1CB8 + 0x01200008 # JR T1 +] diff --git a/worlds/cv64/docs/obscure_checks.md b/worlds/cv64/docs/obscure_checks.md index 4aafc2db1c5f..6f0e0cdbb34e 100644 --- a/worlds/cv64/docs/obscure_checks.md +++ b/worlds/cv64/docs/obscure_checks.md @@ -27,7 +27,7 @@ in vanilla, contains 5 checks in rando. #### Bat archway rock After the broken bridge containing the invisible pathway to the Special1 in vanilla, this rock is off to the side in front of the gate frame with a swarm of bats that come at you, before the Werewolf's territory. Contains 4 checks. If you are new -to speedrunning the vanilla game and haven't yet learned the RNG manip strats, this is a guranteed spot to find a PowerUp at. +to speedrunning the vanilla game and haven't yet learned the RNG manip strats, this is a guaranteed spot to find a PowerUp at. diff --git a/worlds/cv64/options.py b/worlds/cv64/options.py index 495bb51c5ef8..da2b9f949662 100644 --- a/worlds/cv64/options.py +++ b/worlds/cv64/options.py @@ -74,7 +74,8 @@ class HardItemPool(Toggle): class Special1sPerWarp(Range): - """Sets how many Special1 jewels are needed per warp menu option unlock.""" + """Sets how many Special1 jewels are needed per warp menu option unlock. + This will decrease until the number x 7 is less than or equal to the Total Specail1s if it isn't already.""" range_start = 1 range_end = 10 default = 1 @@ -82,8 +83,7 @@ class Special1sPerWarp(Range): class TotalSpecial1s(Range): - """Sets how many Speical1 jewels are in the pool in total. - If this is set to be less than Special1s Per Warp x 7, it will decrease by 1 until it isn't.""" + """Sets how many Speical1 jewels are in the pool in total.""" range_start = 7 range_end = 70 default = 7 diff --git a/worlds/cv64/rom.py b/worlds/cv64/rom.py index ab8c7030aa4e..ab4371b0ac12 100644 --- a/worlds/cv64/rom.py +++ b/worlds/cv64/rom.py @@ -1,9 +1,9 @@ - +import json import Utils from BaseClasses import Location -from worlds.Files import APDeltaPatch -from typing import List, Dict, Union, Iterable, Collection, TYPE_CHECKING +from worlds.Files import APProcedurePatch, APTokenMixin, APTokenTypes, APPatchExtension +from typing import List, Dict, Union, Iterable, Collection, Optional, TYPE_CHECKING import hashlib import os @@ -22,37 +22,34 @@ if TYPE_CHECKING: from . import CV64World -CV64US10HASH = "1cc5cf3b4d29d8c3ade957648b529dc1" -ROM_PLAYER_LIMIT = 65535 +CV64_US_10_HASH = "1cc5cf3b4d29d8c3ade957648b529dc1" warp_map_offsets = [0xADF67, 0xADF77, 0xADF87, 0xADF97, 0xADFA7, 0xADFBB, 0xADFCB, 0xADFDF] -class LocalRom: +class RomData: orig_buffer: None buffer: bytearray - def __init__(self, file: str) -> None: - self.orig_buffer = None - - with open(file, "rb") as stream: - self.buffer = bytearray(stream.read()) + def __init__(self, file: bytes, name: Optional[str] = None) -> None: + self.file = bytearray(file) + self.name = name def read_bit(self, address: int, bit_number: int) -> bool: bitflag = (1 << bit_number) return (self.buffer[address] & bitflag) != 0 def read_byte(self, address: int) -> int: - return self.buffer[address] + return self.file[address] def read_bytes(self, start_address: int, length: int) -> bytearray: - return self.buffer[start_address:start_address + length] + return self.file[start_address:start_address + length] def write_byte(self, address: int, value: int) -> None: - self.buffer[address] = value + self.file[address] = value def write_bytes(self, start_address: int, values: Collection[int]) -> None: - self.buffer[start_address:start_address + len(values)] = values + self.file[start_address:start_address + len(values)] = values def write_int16(self, address: int, value: int) -> None: value = value & 0xFFFF @@ -78,862 +75,932 @@ def write_int32s(self, start_address: int, values: list) -> None: for i, value in enumerate(values): self.write_int32(start_address + (i * 4), value) - def write_to_file(self, filepath: str) -> None: - with open(filepath, "wb") as outfile: - outfile.write(self.buffer) + def get_bytes(self) -> bytes: + return bytes(self.file) -def patch_rom(world: "CV64World", rom: LocalRom, offset_data: Dict[int, int], shop_name_list: List[str], - shop_desc_list: List[List[Union[int, str, None]]], shop_colors_list: List[bytearray], - active_locations: Iterable[Location]) -> None: +class CV64PatchExtensions(APPatchExtension): + game = "Castlevania 64" - multiworld = world.multiworld - options = world.options - player = world.player - active_stage_exits = world.active_stage_exits - s1s_per_warp = world.s1s_per_warp + @staticmethod + def apply_patches(caller: APProcedurePatch, rom: bytes, options_file: str) -> bytes: + rom_data = RomData(rom) + options = json.loads(caller.get_file(options_file).decode("utf-8")) + + # NOP out the CRC BNEs + rom_data.write_int32(0x66C, 0x00000000) + rom_data.write_int32(0x678, 0x00000000) + + # Always offer Hard Mode on file creation + rom_data.write_int32(0xC8810, 0x240A0100) # ADDIU T2, R0, 0x0100 + + # Disable the Easy Mode cutoff point at Castle Center's elevator. + rom_data.write_int32(0xD9E18, 0x240D0000) # ADDIU T5, R0, 0x0000 + + # Disable the Forest, Castle Wall, and Villa intro cutscenes and make it possible to change the starting level + rom_data.write_byte(0xB73308, 0x00) + rom_data.write_byte(0xB7331A, 0x40) + rom_data.write_byte(0xB7332B, 0x4C) + rom_data.write_byte(0xB6302B, 0x00) + rom_data.write_byte(0x109F8F, 0x00) + + # Prevent Forest end cutscene flag from setting so it can be triggered infinitely. + rom_data.write_byte(0xEEA51, 0x01) + + # Hack to make the Forest, CW and Villa intro cutscenes play at the start of their levels no matter what map + # came before them. + rom_data.write_int32(0x97244, 0x803FDD60) + rom_data.write_int32s(0xBFDD60, patches.forest_cw_villa_intro_cs_player) + + # Make changing the map ID to 0xFF reset the map. Helpful to work around a bug wherein the camera gets stuck + # when entering a loading zone that doesn't change the map. + rom_data.write_int32s(0x197B0, [0x0C0FF7E6, # JAL 0x803FDF98 + 0x24840008]) # ADDIU A0, A0, 0x0008 + rom_data.write_int32s(0xBFDF98, patches.map_id_refresher) + + # Enable swapping characters when loading into a map by holding L. + rom_data.write_int32(0x97294, 0x803FDFC4) + rom_data.write_int32(0x19710, 0x080FF80E) # J 0x803FE038 + rom_data.write_int32s(0xBFDFC4, patches.character_changer) + + # Villa coffin time-of-day hack + rom_data.write_byte(0xD9D83, 0x74) + rom_data.write_int32(0xD9D84, 0x080FF14D) # J 0x803FC534 + rom_data.write_int32s(0xBFC534, patches.coffin_time_checker) + + # Fix both Castle Center elevator bridges for both characters unless enabling only one character's stages. + # At which point one bridge will be always broken and one always repaired instead. + if options["character_stages"] == CharacterStages.option_reinhardt_only: + rom_data.write_int32(0x6CEAA0, 0x240B0000) # ADDIU T3, R0, 0x0000 + elif options["character_stages"] == CharacterStages.option_carrie_only: + rom_data.write_int32(0x6CEAA0, 0x240B0001) # ADDIU T3, R0, 0x0001 + else: + rom_data.write_int32(0x6CEAA0, 0x240B0001) # ADDIU T3, R0, 0x0001 + rom_data.write_int32(0x6CEAA4, 0x240D0001) # ADDIU T5, R0, 0x0001 + + # Were-bull arena flag hack + rom_data.write_int32(0x6E38F0, 0x0C0FF157) # JAL 0x803FC55C + rom_data.write_int32s(0xBFC55C, patches.werebull_flag_unsetter) + rom_data.write_int32(0xA949C, 0x0C0FF380) # JAL 0x803FCE00 + rom_data.write_int32s(0xBFCE00, patches.werebull_flag_pickup_setter) + + # Enable being able to carry multiple Special jewels, Nitros, and Mandragoras simultaneously + rom_data.write_int32(0xBF1F4, 0x3C038039) # LUI V1, 0x8039 + # Special1 + rom_data.write_int32(0xBF210, 0x80659C4B) # LB A1, 0x9C4B (V1) + rom_data.write_int32(0xBF214, 0x24A50001) # ADDIU A1, A1, 0x0001 + rom_data.write_int32(0xBF21C, 0xA0659C4B) # SB A1, 0x9C4B (V1) + # Special2 + rom_data.write_int32(0xBF230, 0x80659C4C) # LB A1, 0x9C4C (V1) + rom_data.write_int32(0xBF234, 0x24A50001) # ADDIU A1, A1, 0x0001 + rom_data.write_int32(0xbf23C, 0xA0659C4C) # SB A1, 0x9C4C (V1) + # Magical Nitro + rom_data.write_int32(0xBF360, 0x10000004) # B 0x8013C184 + rom_data.write_int32(0xBF378, 0x25E50001) # ADDIU A1, T7, 0x0001 + rom_data.write_int32(0xBF37C, 0x10000003) # B 0x8013C19C + # Mandragora + rom_data.write_int32(0xBF3A8, 0x10000004) # B 0x8013C1CC + rom_data.write_int32(0xBF3C0, 0x25050001) # ADDIU A1, T0, 0x0001 + rom_data.write_int32(0xBF3C4, 0x10000003) # B 0x8013C1E4 + + # Give PowerUps their Legacy of Darkness behavior when attempting to pick up more than two + rom_data.write_int16(0xA9624, 0x1000) + rom_data.write_int32(0xA9730, 0x24090000) # ADDIU T1, R0, 0x0000 + rom_data.write_int32(0xBF2FC, 0x080FF16D) # J 0x803FC5B4 + rom_data.write_int32(0xBF300, 0x00000000) # NOP + rom_data.write_int32s(0xBFC5B4, patches.give_powerup_stopper) + + # Rename the Wooden Stake and Rose to "You are a FOOL!" + rom_data.write_bytes(0xEFE34, + bytearray([0xFF, 0xFF, 0xA2, 0x0B]) + cv64_string_to_bytearray("You are a FOOL!", + append_end=False)) + # Capitalize the "k" in "Archives key" to be consistent with...literally every other key name! + rom_data.write_byte(0xEFF21, 0x2D) + + # Skip the "There is a white jewel" text so checking one saves the game instantly. + rom_data.write_int32s(0xEFC72, [0x00020002 for _ in range(37)]) + rom_data.write_int32(0xA8FC0, 0x24020001) # ADDIU V0, R0, 0x0001 + # Skip the yes/no prompts when activating things. + rom_data.write_int32s(0xBFDACC, patches.map_text_redirector) + rom_data.write_int32(0xA9084, 0x24020001) # ADDIU V0, R0, 0x0001 + rom_data.write_int32(0xBEBE8, 0x0C0FF6B4) # JAL 0x803FDAD0 + # Skip Vincent and Heinrich's mandatory-for-a-check dialogue + rom_data.write_int32(0xBED9C, 0x0C0FF6DA) # JAL 0x803FDB68 + # Skip the long yes/no prompt in the CC planetarium to set the pieces. + rom_data.write_int32(0xB5C5DF, 0x24030001) # ADDIU V1, R0, 0x0001 + # Skip the yes/no prompt to activate the CC elevator. + rom_data.write_int32(0xB5E3FB, 0x24020001) # ADDIU V0, R0, 0x0001 + # Skip the yes/no prompts to set Nitro/Mandragora at both walls. + rom_data.write_int32(0xB5DF3E, 0x24030001) # ADDIU V1, R0, 0x0001 + + # Custom message if you try checking the downstairs CC crack before removing the seal. + rom_data.write_bytes(0xBFDBAC, cv64_string_to_bytearray("The Furious Nerd Curse\n" + "prevents you from setting\n" + "anything until the seal\n" + "is removed!", True)) + + rom_data.write_int32s(0xBFDD20, patches.special_descriptions_redirector) + + # Change the Stage Select menu options + rom_data.write_int32s(0xADF64, patches.warp_menu_rewrite) + rom_data.write_int32s(0x10E0C8, patches.warp_pointer_table) + + # Play the "teleportation" sound effect when teleporting + rom_data.write_int32s(0xAE088, [0x08004FAB, # J 0x80013EAC + 0x2404019E]) # ADDIU A0, R0, 0x019E + + # Lizard-man save proofing + rom_data.write_int32(0xA99AC, 0x080FF0B8) # J 0x803FC2E0 + rom_data.write_int32s(0xBFC2E0, patches.boss_save_stopper) + + # Disable or guarantee vampire Vincent's fight + if options["vincent_fight_condition"] == VincentFightCondition.option_never: + rom_data.write_int32(0xAACC0, 0x24010001) # ADDIU AT, R0, 0x0001 + rom_data.write_int32(0xAACE0, 0x24180000) # ADDIU T8, R0, 0x0000 + elif options["vincent_fight_condition"] == VincentFightCondition.option_always: + rom_data.write_int32(0xAACE0, 0x24180010) # ADDIU T8, R0, 0x0010 + else: + rom_data.write_int32(0xAACE0, 0x24180000) # ADDIU T8, R0, 0x0000 + + # Disable or guarantee Renon's fight + rom_data.write_int32(0xAACB4, 0x080FF1A4) # J 0x803FC690 + if options["renon_fight_condition"] == RenonFightCondition.option_never: + rom_data.write_byte(0xB804F0, 0x00) + rom_data.write_byte(0xB80632, 0x00) + rom_data.write_byte(0xB807E3, 0x00) + rom_data.write_byte(0xB80988, 0xB8) + rom_data.write_byte(0xB816BD, 0xB8) + rom_data.write_byte(0xB817CF, 0x00) + rom_data.write_int32s(0xBFC690, patches.renon_cutscene_checker_jr) + elif options["renon_fight_condition"] == RenonFightCondition.option_always: + rom_data.write_byte(0xB804F0, 0x0C) + rom_data.write_byte(0xB80632, 0x0C) + rom_data.write_byte(0xB807E3, 0x0C) + rom_data.write_byte(0xB80988, 0xC4) + rom_data.write_byte(0xB816BD, 0xC4) + rom_data.write_byte(0xB817CF, 0x0C) + rom_data.write_int32s(0xBFC690, patches.renon_cutscene_checker_jr) + else: + rom_data.write_int32s(0xBFC690, patches.renon_cutscene_checker) + + # NOP the Easy Mode check when buying a thing from Renon, so his fight can be triggered even on this mode. + rom_data.write_int32(0xBD8B4, 0x00000000) + + # Disable or guarantee the Bad Ending + if options["bad_ending_condition"] == BadEndingCondition.option_never: + rom_data.write_int32(0xAEE5C6, 0x3C0A0000) # LUI T2, 0x0000 + elif options["bad_ending_condition"] == BadEndingCondition.option_always: + rom_data.write_int32(0xAEE5C6, 0x3C0A0040) # LUI T2, 0x0040 + + # Play Castle Keep's song if teleporting in front of Dracula's door outside the escape sequence + rom_data.write_int32(0x6E937C, 0x080FF12E) # J 0x803FC4B8 + rom_data.write_int32s(0xBFC4B8, patches.ck_door_music_player) + + # Increase item capacity to 100 if "Increase Item Limit" is turned on + if options["increase_item_limit"]: + rom_data.write_byte(0xBF30B, 0x63) # Most items + rom_data.write_byte(0xBF3F7, 0x63) # Sun/Moon cards + rom_data.write_byte(0xBF353, 0x64) # Keys (increase regardless) + + # Change the item healing values if "Nerf Healing" is turned on + if options["nerf_healing_items"]: + rom_data.write_byte(0xB56371, 0x50) # Healing kit (100 -> 80) + rom_data.write_byte(0xB56374, 0x32) # Roast beef ( 80 -> 50) + rom_data.write_byte(0xB56377, 0x19) # Roast chicken ( 50 -> 25) + + # Disable loading zone healing if turned off + if not options["loading_zone_heals"]: + rom_data.write_byte(0xD99A5, 0x00) # Skip all loading zone checks + rom_data.write_byte(0xA9DFFB, + 0x40) # Disable free heal from King Skeleton by reading the unused magic meter value + + # Disable spinning on the Special1 and 2 pickup models so colorblind people can more easily identify them + rom_data.write_byte(0xEE4F5, 0x00) # Special1 + rom_data.write_byte(0xEE505, 0x00) # Special2 + # Make the Special2 the same size as a Red jewel(L) to further distinguish them + rom_data.write_int32(0xEE4FC, 0x3FA66666) + + # Prevent the vanilla Magical Nitro transport's "can explode" flag from setting + rom_data.write_int32(0xB5D7AA, 0x00000000) # NOP + + # Ensure the vampire Nitro check will always pass, so they'll never not spawn and crash the Villa cutscenes + rom_data.write_byte(0xA6253D, 0x03) + + # Enable the Game Over's "Continue" menu starting the cursor on whichever checkpoint is most recent + rom_data.write_int32(0xB4DDC, 0x0C060D58) # JAL 0x80183560 + rom_data.write_int32s(0x106750, patches.continue_cursor_start_checker) + rom_data.write_int32(0x1C444, 0x080FF08A) # J 0x803FC228 + rom_data.write_int32(0x1C2A0, 0x080FF08A) # J 0x803FC228 + rom_data.write_int32s(0xBFC228, patches.savepoint_cursor_updater) + rom_data.write_int32(0x1C2D0, 0x080FF094) # J 0x803FC250 + rom_data.write_int32s(0xBFC250, patches.stage_start_cursor_updater) + rom_data.write_byte(0xB585C8, 0xFF) + + # Make the Special1 and 2 play sounds when you reach milestones with them. + rom_data.write_int32s(0xBFDA50, patches.special_sound_notifs) + rom_data.write_int32(0xBF240, 0x080FF694) # J 0x803FDA50 + rom_data.write_int32(0xBF220, 0x080FF69E) # J 0x803FDA78 + + # Add data for White Jewel #22 (the new Duel Tower savepoint) at the end of the White Jewel ID data list + rom_data.write_int16s(0x104AC8, [0x0000, 0x0006, + 0x0013, 0x0015]) + + # Take the contract in Waterway off of its 00400000 bitflag. + rom_data.write_byte(0x87E3DA, 0x00) + + # Spawn coordinates list extension + rom_data.write_int32(0xD5BF4, 0x080FF103) # J 0x803FC40C + rom_data.write_int32s(0xBFC40C, patches.spawn_coordinates_extension) + rom_data.write_int32s(0x108A5E, patches.waterway_end_coordinates) + + # Fix a vanilla issue wherein saving in a character-exclusive stage as the other character would incorrectly + # display the name of that character's equivalent stage on the save file instead of the one they're actually in. + rom_data.write_byte(0xC9FE3, 0xD4) + rom_data.write_byte(0xCA055, 0x08) + rom_data.write_byte(0xCA066, 0x40) + rom_data.write_int32(0xCA068, 0x860C17D0) # LH T4, 0x17D0 (S0) + rom_data.write_byte(0xCA06D, 0x08) + rom_data.write_byte(0x104A31, 0x01) + rom_data.write_byte(0x104A39, 0x01) + rom_data.write_byte(0x104A89, 0x01) + rom_data.write_byte(0x104A91, 0x01) + rom_data.write_byte(0x104A99, 0x01) + rom_data.write_byte(0x104AA1, 0x01) + + # CC top elevator switch check + rom_data.write_int32(0x6CF0A0, 0x0C0FF0B0) # JAL 0x803FC2C0 + rom_data.write_int32s(0xBFC2C0, patches.elevator_flag_checker) + + # Disable time restrictions + if options["disable_time_restrictions"]: + # Fountain + rom_data.write_int32(0x6C2340, 0x00000000) # NOP + rom_data.write_int32(0x6C257C, 0x10000023) # B [forward 0x23] + # Rosa + rom_data.write_byte(0xEEAAB, 0x00) + rom_data.write_byte(0xEEAAD, 0x18) + # Moon doors + rom_data.write_int32(0xDC3E0, 0x00000000) # NOP + rom_data.write_int32(0xDC3E8, 0x00000000) # NOP + # Sun doors + rom_data.write_int32(0xDC410, 0x00000000) # NOP + rom_data.write_int32(0xDC418, 0x00000000) # NOP + + # Custom data-loading code + rom_data.write_int32(0x6B5028, 0x08060D70) # J 0x801835D0 + rom_data.write_int32s(0x1067B0, patches.custom_code_loader) + + # Custom remote item rewarding and DeathLink receiving code + rom_data.write_int32(0x19B98, 0x080FF000) # J 0x803FC000 + rom_data.write_int32s(0xBFC000, patches.remote_item_giver) + rom_data.write_int32s(0xBFE190, patches.subweapon_surface_checker) + + # 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) + + # Set the DeathLink ROM flag if it's on at all. + if options["death_link"] != DeathLink.option_off: + rom_data.write_byte(0xBFBFDE, 0x01) + + # DeathLink counter decrementer code + rom_data.write_int32(0x1C340, 0x080FF8F0) # J 0x803FE3C0 + rom_data.write_int32s(0xBFE3C0, patches.deathlink_counter_decrementer) + rom_data.write_int32(0x25B6C, 0x080FFA5E) # J 0x803FE978 + rom_data.write_int32s(0xBFE978, patches.launch_fall_killer) + + # Death flag un-setter on "Beginning of stage" state overwrite code + rom_data.write_int32(0x1C2B0, 0x080FF047) # J 0x803FC11C + rom_data.write_int32s(0xBFC11C, patches.death_flag_unsetter) + + # Warp menu-opening code + rom_data.write_int32(0xB9BA8, 0x080FF099) # J 0x803FC264 + rom_data.write_int32s(0xBFC264, patches.warp_menu_opener) + + # NPC item textbox hack + rom_data.write_int32(0xBF1DC, 0x080FF904) # J 0x803FE410 + rom_data.write_int32(0xBF1E0, 0x27BDFFE0) # ADDIU SP, SP, -0x20 + rom_data.write_int32s(0xBFE410, patches.npc_item_hack) + + # Sub-weapon check function hook + rom_data.write_int32(0xBF32C, 0x00000000) # NOP + rom_data.write_int32(0xBF330, 0x080FF05E) # J 0x803FC178 + rom_data.write_int32s(0xBFC178, patches.give_subweapon_stopper) + + # Warp menu Special1 restriction + rom_data.write_int32(0xADD68, 0x0C04AB12) # JAL 0x8012AC48 + rom_data.write_int32s(0xADE28, patches.stage_select_overwrite) + rom_data.write_byte(0xADE47, options["s1s_per_warp"]) + + # Dracula's door text pointer hijack + rom_data.write_int32(0xD69F0, 0x080FF141) # J 0x803FC504 + rom_data.write_int32s(0xBFC504, patches.dracula_door_text_redirector) + + # Dracula's chamber condition + rom_data.write_int32(0xE2FDC, 0x0804AB25) # J 0x8012AC78 + rom_data.write_int32s(0xADE84, patches.special_goal_checker) + rom_data.write_bytes(0xBFCC48, + [0xA0, 0x00, 0xFF, 0xFF, 0xA0, 0x01, 0xFF, 0xFF, 0xA0, 0x02, 0xFF, 0xFF, 0xA0, 0x03, 0xFF, + 0xFF, 0xA0, 0x04, 0xFF, 0xFF, 0xA0, 0x05, 0xFF, 0xFF, 0xA0, 0x06, 0xFF, 0xFF, 0xA0, 0x07, + 0xFF, 0xFF, 0xA0, 0x08, 0xFF, 0xFF, 0xA0, 0x09]) + if options["draculas_condition"] == DraculasCondition.option_crystal: + rom_data.write_int32(0x6C8A54, 0x0C0FF0C1) # JAL 0x803FC304 + rom_data.write_int32s(0xBFC304, patches.crystal_special2_giver) + rom_data.write_bytes(0xBFCC6E, cv64_string_to_bytearray(f"It won't budge!\n" + f"You'll need the power\n" + f"of the basement crystal\n" + f"to undo the seal.", True)) + special2_name = "Crystal " + special2_text = "The crystal is on!\n" \ + "Time to teach the old man\n" \ + "a lesson!" + elif options["draculas_condition"] == DraculasCondition.option_bosses: + rom_data.write_int32(0xBBD50, 0x080FF18C) # J 0x803FC630 + rom_data.write_int32s(0xBFC630, patches.boss_special2_giver) + rom_data.write_int32s(0xBFC55C, patches.werebull_flag_unsetter_special2_electric_boogaloo) + rom_data.write_bytes(0xBFCC6E, cv64_string_to_bytearray(f"It won't budge!\n" + f"You'll need to defeat\n" + f"{options['required_s2s']} powerful monsters\n" + f"to undo the seal.", True)) + special2_name = "Trophy " + special2_text = f"Proof you killed a powerful\n" \ + f"Night Creature. Earn {options['required_s2s']}/{options['total_s2s']}\n" \ + f"to battle Dracula." + elif options["draculas_condition"] == DraculasCondition.option_specials: + special2_name = "Special2" + rom_data.write_bytes(0xBFCC6E, cv64_string_to_bytearray(f"It won't budge!\n" + f"You'll need to find\n" + f"{options['required_s2s']} Special2 jewels\n" + f"to undo the seal.", True)) + special2_text = f"Need {options['required_s2s']}/{options['total_s2s']} to kill Dracula.\n" \ + f"Looking closely, you see...\n" \ + f"a piece of him within?" + else: + rom_data.write_byte(0xADE8F, 0x00) + special2_name = "Special2" + special2_text = "If you're reading this,\n" \ + "how did you get a Special2!?" + rom_data.write_byte(0xADE8F, options["required_s2s"]) + # Change the Special2 name depending on the setting. + rom_data.write_bytes(0xEFD4E, cv64_string_to_bytearray(special2_name)) + # Change the Special1 and 2 menu descriptions to tell you how many you need to unlock a warp and fight Dracula + # respectively. + special_text_bytes = cv64_string_to_bytearray(f"{options['s1s_per_warp']} per warp unlock.\n" + f"{options['total_special1s']} exist in total.\n" + f"Z + R + START to warp.") + cv64_string_to_bytearray( + special2_text) + rom_data.write_bytes(0xBFE53C, special_text_bytes) + + # On-the-fly overlay modifier + rom_data.write_int32s(0xBFC338, patches.double_component_checker) + rom_data.write_int32s(0xBFC3D4, patches.downstairs_seal_checker) + rom_data.write_int32s(0xBFE074, patches.mandragora_with_nitro_setter) + rom_data.write_int32s(0xBFC700, patches.overlay_modifiers) + + # On-the-fly actor data modifier hook + rom_data.write_int32(0xEAB04, 0x080FF21E) # J 0x803FC878 + rom_data.write_int32s(0xBFC870, patches.map_data_modifiers) + + # Fix to make flags apply to freestanding invisible items properly + rom_data.write_int32(0xA84F8, 0x90CC0039) # LBU T4, 0x0039 (A2) + + # Fix locked doors to check the key counters instead of their vanilla key locations' bitflags + # Pickup flag check modifications: + rom_data.write_int32(0x10B2D8, 0x00000002) # Left Tower Door + rom_data.write_int32(0x10B2F0, 0x00000003) # Storeroom Door + rom_data.write_int32(0x10B2FC, 0x00000001) # Archives Door + rom_data.write_int32(0x10B314, 0x00000004) # Maze Gate + rom_data.write_int32(0x10B350, 0x00000005) # Copper Door + rom_data.write_int32(0x10B3A4, 0x00000006) # Torture Chamber Door + rom_data.write_int32(0x10B3B0, 0x00000007) # ToE Gate + rom_data.write_int32(0x10B3BC, 0x00000008) # Science Door1 + rom_data.write_int32(0x10B3C8, 0x00000009) # Science Door2 + rom_data.write_int32(0x10B3D4, 0x0000000A) # Science Door3 + rom_data.write_int32(0x6F0094, 0x0000000B) # CT Door 1 + rom_data.write_int32(0x6F00A4, 0x0000000C) # CT Door 2 + rom_data.write_int32(0x6F00B4, 0x0000000D) # CT Door 3 + # Item counter decrement check modifications: + rom_data.write_int32(0xEDA84, 0x00000001) # Archives Door + rom_data.write_int32(0xEDA8C, 0x00000002) # Left Tower Door + rom_data.write_int32(0xEDA94, 0x00000003) # Storeroom Door + rom_data.write_int32(0xEDA9C, 0x00000004) # Maze Gate + rom_data.write_int32(0xEDAA4, 0x00000005) # Copper Door + rom_data.write_int32(0xEDAAC, 0x00000006) # Torture Chamber Door + rom_data.write_int32(0xEDAB4, 0x00000007) # ToE Gate + rom_data.write_int32(0xEDABC, 0x00000008) # Science Door1 + rom_data.write_int32(0xEDAC4, 0x00000009) # Science Door2 + rom_data.write_int32(0xEDACC, 0x0000000A) # Science Door3 + rom_data.write_int32(0xEDAD4, 0x0000000B) # CT Door 1 + rom_data.write_int32(0xEDADC, 0x0000000C) # CT Door 2 + rom_data.write_int32(0xEDAE4, 0x0000000D) # CT Door 3 + + # Fix ToE gate's "unlocked" flag in the locked door flags table + rom_data.write_int16(0x10B3B6, 0x0001) + + rom_data.write_int32(0x10AB2C, 0x8015FBD4) # Maze Gates' check code pointer adjustments + rom_data.write_int32(0x10AB40, 0x8015FBD4) + rom_data.write_int32s(0x10AB50, [0x0D0C0000, + 0x8015FBD4]) + rom_data.write_int32s(0x10AB64, [0x0D0C0000, + 0x8015FBD4]) + rom_data.write_int32s(0xE2E14, patches.normal_door_hook) + rom_data.write_int32s(0xBFC5D0, patches.normal_door_code) + rom_data.write_int32s(0x6EF298, patches.ct_door_hook) + rom_data.write_int32s(0xBFC608, patches.ct_door_code) + # Fix key counter not decrementing if 2 or above + rom_data.write_int32(0xAA0E0, 0x24020000) # ADDIU V0, R0, 0x0000 + + # Make the Easy-only candle drops in Room of Clocks appear on any difficulty + rom_data.write_byte(0x9B518F, 0x01) + + # Slightly move some once-invisible freestanding items to be more visible + if options["invisible_items"] == InvisibleItems.option_reveal_all: + rom_data.write_byte(0x7C7F95, 0xEF) # Forest dirge maiden statue + rom_data.write_byte(0x7C7FA8, 0xAB) # Forest werewolf statue + rom_data.write_byte(0x8099C4, 0x8C) # Villa courtyard tombstone + rom_data.write_byte(0x83A626, 0xC2) # Villa living room painting + # rom_data.write_byte(0x83A62F, 0x64) # Villa Mary's room table + rom_data.write_byte(0xBFCB97, 0xF5) # CC torture instrument rack + rom_data.write_byte(0x8C44D5, 0x22) # CC red carpet hallway knight + rom_data.write_byte(0x8DF57C, 0xF1) # CC cracked wall hallway flamethrower + rom_data.write_byte(0x90FCD6, 0xA5) # CC nitro hallway flamethrower + rom_data.write_byte(0x90FB9F, 0x9A) # CC invention room round machine + rom_data.write_byte(0x90FBAF, 0x03) # CC invention room giant famicart + rom_data.write_byte(0x90FE54, 0x97) # CC staircase knight (x) + rom_data.write_byte(0x90FE58, 0xFB) # CC staircase knight (z) + + # Change the bitflag on the item in upper coffin in Forest final switch gate tomb to one that's not used by + # something else. + rom_data.write_int32(0x10C77C, 0x00000002) + + # Make the torch directly behind Dracula's chamber that normally doesn't set a flag set bitflag 0x08 in + # 0x80389BFA. + rom_data.write_byte(0x10CE9F, 0x01) + + # Change the CC post-Behemoth boss depending on the option for Post-Behemoth Boss + if options["post_behemoth_boss"] == PostBehemothBoss.option_inverted: + rom_data.write_byte(0xEEDAD, 0x02) + rom_data.write_byte(0xEEDD9, 0x01) + elif options["post_behemoth_boss"] == PostBehemothBoss.option_always_rosa: + rom_data.write_byte(0xEEDAD, 0x00) + rom_data.write_byte(0xEEDD9, 0x03) + # Put both on the same flag so changing character won't trigger a rematch with the same boss. + rom_data.write_byte(0xEED8B, 0x40) + elif options["post_behemoth_boss"] == PostBehemothBoss.option_always_camilla: + rom_data.write_byte(0xEEDAD, 0x03) + rom_data.write_byte(0xEEDD9, 0x00) + rom_data.write_byte(0xEED8B, 0x40) + + # Change the RoC boss depending on the option for Room of Clocks Boss + if options["room_of_clocks_boss"] == RoomOfClocksBoss.option_inverted: + rom_data.write_byte(0x109FB3, 0x56) + rom_data.write_byte(0x109FBF, 0x44) + rom_data.write_byte(0xD9D44, 0x14) + rom_data.write_byte(0xD9D4C, 0x14) + elif options["room_of_clocks_boss"] == RoomOfClocksBoss.option_always_death: + rom_data.write_byte(0x109FBF, 0x44) + rom_data.write_byte(0xD9D45, 0x00) + # Put both on the same flag so changing character won't trigger a rematch with the same boss. + rom_data.write_byte(0x109FB7, 0x90) + rom_data.write_byte(0x109FC3, 0x90) + elif options["room_of_clocks_boss"] == RoomOfClocksBoss.option_always_actrise: + rom_data.write_byte(0x109FB3, 0x56) + rom_data.write_int32(0xD9D44, 0x00000000) + rom_data.write_byte(0xD9D4D, 0x00) + rom_data.write_byte(0x109FB7, 0x90) + rom_data.write_byte(0x109FC3, 0x90) + + # Un-nerf Actrise when playing as Reinhardt. + # This is likely a leftover TGS demo feature in which players could battle Actrise as Reinhardt. + rom_data.write_int32(0xB318B4, 0x240E0001) # ADDIU T6, R0, 0x0001 + + # Tunnel gondola skip + if options["skip_gondolas"]: + rom_data.write_int32(0x6C5F58, 0x080FF7D0) # J 0x803FDF40 + rom_data.write_int32s(0xBFDF40, patches.gondola_skipper) + # New gondola transfer point candle coordinates + rom_data.write_byte(0xBFC9A3, 0x04) + rom_data.write_bytes(0x86D824, [0x27, 0x01, 0x10, 0xF7, 0xA0]) + + # Waterway brick platforms skip + if options["skip_waterway_blocks"]: + rom_data.write_int32(0x6C7E2C, 0x00000000) # NOP + + # Ambience silencing fix + rom_data.write_int32(0xD9270, 0x080FF840) # J 0x803FE100 + rom_data.write_int32s(0xBFE100, patches.ambience_silencer) + # Fix for the door sliding sound playing infinitely if leaving the fan meeting room before the door closes + # entirely. Hooking this in the ambience silencer code does nothing for some reason. + rom_data.write_int32s(0xAE10C, [0x08004FAB, # J 0x80013EAC + 0x3404829B]) # ORI A0, R0, 0x829B + rom_data.write_int32s(0xD9E8C, [0x08004FAB, # J 0x80013EAC + 0x3404829B]) # ORI A0, R0, 0x829B + # Fan meeting room ambience fix + rom_data.write_int32(0x109964, 0x803FE13C) + + # Make the Villa coffin cutscene skippable + rom_data.write_int32(0xAA530, 0x080FF880) # J 0x803FE200 + rom_data.write_int32s(0xBFE200, patches.coffin_cutscene_skipper) + + # Increase shimmy speed + if options["increase_shimmy_speed"]: + rom_data.write_byte(0xA4241, 0x5A) + + # Disable landing fall damage + if options["fall_guard"]: + rom_data.write_byte(0x27B23, 0x00) + + # Enable the unused film reel effect on all cutscenes + if options["cinematic_experience"]: + rom_data.write_int32(0xAA33C, 0x240A0001) # ADDIU T2, R0, 0x0001 + rom_data.write_byte(0xAA34B, 0x0C) + rom_data.write_int32(0xAA4C4, 0x24090001) # ADDIU T1, R0, 0x0001 + + # Permanent PowerUp stuff + if options["permanent_powerups"]: + # Make receiving PowerUps increase the unused menu PowerUp counter instead of the one outside the save + # struct. + rom_data.write_int32(0xBF2EC, 0x806B619B) # LB T3, 0x619B (V1) + rom_data.write_int32(0xBFC5BC, 0xA06C619B) # SB T4, 0x619B (V1) + # Make Reinhardt's whip check the menu PowerUp counter + rom_data.write_int32(0x69FA08, 0x80CC619B) # LB T4, 0x619B (A2) + rom_data.write_int32(0x69FBFC, 0x80C3619B) # LB V1, 0x619B (A2) + rom_data.write_int32(0x69FFE0, 0x818C9C53) # LB T4, 0x9C53 (T4) + # Make Carrie's orb check the menu PowerUp counter + rom_data.write_int32(0x6AC86C, 0x8105619B) # LB A1, 0x619B (T0) + rom_data.write_int32(0x6AC950, 0x8105619B) # LB A1, 0x619B (T0) + rom_data.write_int32(0x6AC99C, 0x810E619B) # LB T6, 0x619B (T0) + rom_data.write_int32(0x5AFA0, 0x80639C53) # LB V1, 0x9C53 (V1) + rom_data.write_int32(0x5B0A0, 0x81089C53) # LB T0, 0x9C53 (T0) + rom_data.write_byte(0x391C7, 0x00) # Prevent PowerUps from dropping from regular enemies + rom_data.write_byte(0xEDEDF, 0x03) # Make any vanishing PowerUps that do show up L jewels instead + # Rename the PowerUp to "PermaUp" + rom_data.write_bytes(0xEFDEE, cv64_string_to_bytearray("PermaUp")) + # Replace the PowerUp in the Forest Special1 Bridge 3HB rock with an L jewel if 3HBs aren't randomized + if not options["multi_hit_breakables"]: + rom_data.write_byte(0x10C7A1, 0x03) + # Change the appearance of the Pot-Pourri to that of a larger PowerUp regardless of the above setting, so other + # game PermaUps are distinguishable. + rom_data.write_int32s(0xEE558, [0x06005F08, 0x3FB00000, 0xFFFFFF00]) + + # Write the associated code for the randomized (or disabled) music list. + if options["background_music"]: + rom_data.write_int32(0x14588, 0x08060D60) # J 0x80183580 + rom_data.write_int32(0x14590, 0x00000000) # NOP + rom_data.write_int32s(0x106770, patches.music_modifier) + rom_data.write_int32(0x15780, 0x0C0FF36E) # JAL 0x803FCDB8 + rom_data.write_int32s(0xBFCDB8, patches.music_comparer_modifier) + + # Enable storing item flags anywhere and changing the item model/visibility on any item instance. + rom_data.write_int32s(0xA857C, [0x080FF38F, # J 0x803FCE3C + 0x94D90038]) # LHU T9, 0x0038 (A2) + rom_data.write_int32s(0xBFCE3C, patches.item_customizer) + rom_data.write_int32s(0xA86A0, [0x0C0FF3AF, # JAL 0x803FCEBC + 0x95C40002]) # LHU A0, 0x0002 (T6) + rom_data.write_int32s(0xBFCEBC, patches.item_appearance_switcher) + rom_data.write_int32s(0xA8728, [0x0C0FF3B8, # JAL 0x803FCEE4 + 0x01396021]) # ADDU T4, T1, T9 + rom_data.write_int32s(0xBFCEE4, patches.item_model_visibility_switcher) + rom_data.write_int32s(0xA8A04, [0x0C0FF3C2, # JAL 0x803FCF08 + 0x018B6021]) # ADDU T4, T4, T3 + rom_data.write_int32s(0xBFCF08, patches.item_shine_visibility_switcher) + + # Make Axes and Crosses in AP Locations drop to their correct height, and make items with changed appearances + # spin their correct speed. + rom_data.write_int32s(0xE649C, [0x0C0FFA03, # JAL 0x803FE80C + 0x956C0002]) # LHU T4, 0x0002 (T3) + rom_data.write_int32s(0xA8B08, [0x080FFA0C, # J 0x803FE830 + 0x960A0038]) # LHU T2, 0x0038 (S0) + rom_data.write_int32s(0xE8584, [0x0C0FFA21, # JAL 0x803FE884 + 0x95D80000]) # LHU T8, 0x0000 (T6) + rom_data.write_int32s(0xE7AF0, [0x0C0FFA2A, # JAL 0x803FE8A8 + 0x958D0000]) # LHU T5, 0x0000 (T4) + rom_data.write_int32s(0xBFE7DC, patches.item_drop_spin_corrector) + + # 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 + + # Once-per-frame gameplay checks + rom_data.write_int32(0x6C848, 0x080FF40D) # J 0x803FD034 + rom_data.write_int32(0xBFD058, 0x0801AEB5) # J 0x8006BAD4 + + # Everything related to dropping the previous sub-weapon + if options["drop_previous_sub_weapon"]: + rom_data.write_int32(0xBFD034, 0x080FF3FF) # J 0x803FCFFC + rom_data.write_int32(0xBFC190, 0x080FF3F2) # J 0x803FCFC8 + rom_data.write_int32s(0xBFCFC4, patches.prev_subweapon_spawn_checker) + rom_data.write_int32s(0xBFCFFC, patches.prev_subweapon_fall_checker) + rom_data.write_int32s(0xBFD060, patches.prev_subweapon_dropper) + + # Everything related to the Countdown counter + if options["countdown"]: + rom_data.write_int32(0xBFD03C, 0x080FF9DC) # J 0x803FE770 + rom_data.write_int32(0xD5D48, 0x080FF4EC) # J 0x803FD3B0 + rom_data.write_int32s(0xBFD3B0, patches.countdown_number_displayer) + rom_data.write_int32s(0xBFD6DC, patches.countdown_number_manager) + rom_data.write_int32s(0xBFE770, patches.countdown_demo_hider) + rom_data.write_int32(0xBFCE2C, 0x080FF5D2) # J 0x803FD748 + rom_data.write_int32s(0xBB168, [0x080FF5F4, # J 0x803FD7D0 + 0x8E020028]) # LW V0, 0x0028 (S0) + rom_data.write_int32s(0xBB1D0, [0x080FF5FB, # J 0x803FD7EC + 0x8E020028]) # LW V0, 0x0028 (S0) + rom_data.write_int32(0xBC4A0, 0x080FF5E6) # J 0x803FD798 + rom_data.write_int32(0xBC4C4, 0x080FF5E6) # J 0x803FD798 + rom_data.write_int32(0x19844, 0x080FF602) # J 0x803FD808 + # If the option is set to "all locations", count it down no matter what the item is. + if options["countdown"] == Countdown.option_all_locations: + rom_data.write_int32s(0xBFD71C, [0x01010101, 0x01010101, 0x01010101, 0x01010101, 0x01010101, 0x01010101, + 0x01010101, 0x01010101, 0x01010101, 0x01010101, 0x01010101]) + else: + # If it's majors, then insert this last minute check I threw together for the weird edge case of a CV64 + # ice trap for another CV64 player taking the form of a major. + rom_data.write_int32s(0xBFD788, [0x080FF717, # J 0x803FDC5C + 0x2529FFFF]) # ADDIU T1, T1, 0xFFFF + rom_data.write_int32s(0xBFDC5C, patches.countdown_extra_safety_check) + rom_data.write_int32(0xA9ECC, + 0x00000000) # NOP the pointless overwrite of the item actor appearance custom value. + + # Ice Trap stuff + rom_data.write_int32(0x697C60, 0x080FF06B) # J 0x803FC18C + rom_data.write_int32(0x6A5160, 0x080FF06B) # J 0x803FC18C + rom_data.write_int32s(0xBFC1AC, patches.ice_trap_initializer) + rom_data.write_int32s(0xBFE700, patches.the_deep_freezer) + rom_data.write_int32s(0xB2F354, [0x3739E4C0, # ORI T9, T9, 0xE4C0 + 0x03200008, # JR T9 + 0x00000000]) # NOP + rom_data.write_int32s(0xBFE4C0, patches.freeze_verifier) + + # Fix for the ice chunk model staying when getting bitten by the maze garden dogs + rom_data.write_int32(0xA2DC48, 0x803FE9C0) + rom_data.write_int32s(0xBFE9C0, patches.dog_bite_ice_trap_fix) + + # Initial Countdown numbers + rom_data.write_int32(0xAD6A8, 0x080FF60A) # J 0x803FD828 + rom_data.write_int32s(0xBFD828, patches.new_game_extras) + + # Everything related to shopsanity + if options["shopsanity"]: + rom_data.write_byte(0xBFBFDF, 0x01) + rom_data.write_bytes(0x103868, cv64_string_to_bytearray("Not obtained. ")) + rom_data.write_int32s(0xBFD8D0, patches.shopsanity_stuff) + rom_data.write_int32(0xBD828, 0x0C0FF643) # JAL 0x803FD90C + rom_data.write_int32(0xBD5B8, 0x0C0FF651) # JAL 0x803FD944 + rom_data.write_int32(0xB0610, 0x0C0FF665) # JAL 0x803FD994 + rom_data.write_int32s(0xBD24C, [0x0C0FF677, # J 0x803FD9DC + 0x00000000]) # NOP + rom_data.write_int32(0xBD618, 0x0C0FF684) # JAL 0x803FDA10 + + # Panther Dash running + if options["panther_dash"]: + rom_data.write_int32(0x69C8C4, 0x0C0FF77E) # JAL 0x803FDDF8 + rom_data.write_int32(0x6AA228, 0x0C0FF77E) # JAL 0x803FDDF8 + rom_data.write_int32s(0x69C86C, [0x0C0FF78E, # JAL 0x803FDE38 + 0x3C01803E]) # LUI AT, 0x803E + rom_data.write_int32s(0x6AA1D0, [0x0C0FF78E, # JAL 0x803FDE38 + 0x3C01803E]) # LUI AT, 0x803E + rom_data.write_int32(0x69D37C, 0x0C0FF79E) # JAL 0x803FDE78 + rom_data.write_int32(0x6AACE0, 0x0C0FF79E) # JAL 0x803FDE78 + rom_data.write_int32s(0xBFDDF8, patches.panther_dash) + # Jump prevention + if options["panther_dash"] == PantherDash.option_jumpless: + rom_data.write_int32(0xBFDE2C, 0x080FF7BB) # J 0x803FDEEC + rom_data.write_int32(0xBFD044, 0x080FF7B1) # J 0x803FDEC4 + rom_data.write_int32s(0x69B630, [0x0C0FF7C6, # JAL 0x803FDF18 + 0x8CCD0000]) # LW T5, 0x0000 (A2) + rom_data.write_int32s(0x6A8EC0, [0x0C0FF7C6, # JAL 0x803FDF18 + 0x8CCC0000]) # LW T4, 0x0000 (A2) + # Fun fact: KCEK put separate code to handle coyote time jumping + rom_data.write_int32s(0x69910C, [0x0C0FF7C6, # JAL 0x803FDF18 + 0x8C4E0000]) # LW T6, 0x0000 (V0) + rom_data.write_int32s(0x6A6718, [0x0C0FF7C6, # JAL 0x803FDF18 + 0x8C4E0000]) # LW T6, 0x0000 (V0) + rom_data.write_int32s(0xBFDEC4, patches.panther_jump_preventer) + + # Everything related to Big Toss. + if options["big_toss"]: + rom_data.write_int32s(0x27E90, [0x0C0FFA38, # JAL 0x803FE8E0 + 0xAFB80074]) # SW T8, 0x0074 (SP) + rom_data.write_int32(0x26F54, 0x0C0FFA4D) # JAL 0x803FE934 + rom_data.write_int32s(0xBFE8E0, patches.big_tosser) + + # Write the specified window colors + rom_data.write_byte(0xAEC23, options["window_color_r"] << 4) + rom_data.write_byte(0xAEC33, options["window_color_g"] << 4) + rom_data.write_byte(0xAEC47, options["window_color_b"] << 4) + rom_data.write_byte(0xAEC43, options["window_color_a"] << 4) + + # Everything relating to loading the other game items text + rom_data.write_int32(0xA8D8C, 0x080FF88F) # J 0x803FE23C + rom_data.write_int32(0xBEA98, 0x0C0FF8B4) # JAL 0x803FE2D0 + rom_data.write_int32(0xBEAB0, 0x0C0FF8BD) # JAL 0x803FE2F8 + rom_data.write_int32(0xBEACC, 0x0C0FF8C5) # JAL 0x803FE314 + rom_data.write_int32s(0xBFE23C, patches.multiworld_item_name_loader) + rom_data.write_bytes(0x10F188, [0x00 for _ in range(264)]) + rom_data.write_bytes(0x10F298, [0x00 for _ in range(264)]) + + # When the game normally JALs to the item prepare textbox function after the player picks up an item, set the + # "no receiving" timer to ensure the item textbox doesn't freak out if you pick something up while there's a + # queue of unreceived items. + rom_data.write_int32(0xA8D94, 0x0C0FF9F0) # JAL 0x803FE7C0 + rom_data.write_int32s(0xBFE7C0, [0x3C088039, # LUI T0, 0x8039 + 0x24090020, # ADDIU T1, R0, 0x0020 + 0x0804EDCE, # J 0x8013B738 + 0xA1099BE0]) # SB T1, 0x9BE0 (T0) + + return rom_data.get_bytes() + + @staticmethod + def patch_ap_graphics(caller: APProcedurePatch, rom: bytes) -> bytes: + rom_data = RomData(rom) + + # Extract the item models file, decompress it, append the AP icons, compress it back, re-insert it. + items_file = lzkn64.decompress_buffer(rom_data.read_bytes(0x9C5310, 0x3D28)) + compressed_file = lzkn64.compress_buffer(items_file[0:0x69B6] + pkgutil.get_data(__name__, "data/ap_icons.bin")) + rom_data.write_bytes(0xBB2D88, compressed_file) + # Update the items' Nisitenma-Ichigo table entry to point to the new file's start and end addresses in the rom. + rom_data.write_int32s(0x95F04, [0x80BB2D88, 0x00BB2D88 + len(compressed_file)]) + # Update the items' decompressed file size tables with the new file's decompressed file size. + rom_data.write_int16(0x95706, 0x7BF0) + rom_data.write_int16(0x104CCE, 0x7BF0) + # Update the Wooden Stake and Roses' item appearance settings table to point to the Archipelago item graphics. + rom_data.write_int16(0xEE5BA, 0x7B38) + rom_data.write_int16(0xEE5CA, 0x7280) + # Change the items' sizes. The progression one will be larger than the non-progression one. + rom_data.write_int32(0xEE5BC, 0x3FF00000) + rom_data.write_int32(0xEE5CC, 0x3FA00000) + + return rom_data.get_bytes() + + +class CV64ProcedurePatch(APProcedurePatch, APTokenMixin): + hash = [CV64_US_10_HASH] + patch_file_ending: str = ".apcv64" + result_file_ending: str = ".z64" + + game = "Castlevania 64" + + procedure = [ + ("apply_patches", ["options.json"]), + ("apply_tokens", ["token_data.bin"]), + ("patch_ap_graphics", []) + ] + + @classmethod + def get_source_data(cls) -> bytes: + return get_base_rom_bytes() + + +def write_patch(world: "CV64World", patch: CV64ProcedurePatch, offset_data: Dict[int, bytes], shop_name_list: List[str], + shop_desc_list: List[List[Union[int, str, None]]], shop_colors_list: List[bytearray], + active_locations: Iterable[Location]) -> None: active_warp_list = world.active_warp_list - required_s2s = world.required_s2s - total_s2s = world.total_s2s - - # NOP out the CRC BNEs - rom.write_int32(0x66C, 0x00000000) - rom.write_int32(0x678, 0x00000000) - - # Always offer Hard Mode on file creation - rom.write_int32(0xC8810, 0x240A0100) # ADDIU T2, R0, 0x0100 - - # Disable Easy Mode cutoff point at Castle Center elevator - rom.write_int32(0xD9E18, 0x240D0000) # ADDIU T5, R0, 0x0000 - - # Disable the Forest, Castle Wall, and Villa intro cutscenes and make it possible to change the starting level - rom.write_byte(0xB73308, 0x00) - rom.write_byte(0xB7331A, 0x40) - rom.write_byte(0xB7332B, 0x4C) - rom.write_byte(0xB6302B, 0x00) - rom.write_byte(0x109F8F, 0x00) - - # Prevent Forest end cutscene flag from setting so it can be triggered infinitely - rom.write_byte(0xEEA51, 0x01) - - # Hack to make the Forest, CW and Villa intro cutscenes play at the start of their levels no matter what map came - # before them - rom.write_int32(0x97244, 0x803FDD60) - rom.write_int32s(0xBFDD60, patches.forest_cw_villa_intro_cs_player) - - # Make changing the map ID to 0xFF reset the map. Helpful to work around a bug wherein the camera gets stuck when - # entering a loading zone that doesn't change the map. - rom.write_int32s(0x197B0, [0x0C0FF7E6, # JAL 0x803FDF98 - 0x24840008]) # ADDIU A0, A0, 0x0008 - rom.write_int32s(0xBFDF98, patches.map_id_refresher) - - # Enable swapping characters when loading into a map by holding L. - rom.write_int32(0x97294, 0x803FDFC4) - rom.write_int32(0x19710, 0x080FF80E) # J 0x803FE038 - rom.write_int32s(0xBFDFC4, patches.character_changer) - - # Villa coffin time-of-day hack - rom.write_byte(0xD9D83, 0x74) - rom.write_int32(0xD9D84, 0x080FF14D) # J 0x803FC534 - rom.write_int32s(0xBFC534, patches.coffin_time_checker) - - # Fix both Castle Center elevator bridges for both characters unless enabling only one character's stages. At which - # point one bridge will be always broken and one always repaired instead. - if options.character_stages == CharacterStages.option_reinhardt_only: - rom.write_int32(0x6CEAA0, 0x240B0000) # ADDIU T3, R0, 0x0000 - elif options.character_stages == CharacterStages.option_carrie_only: - rom.write_int32(0x6CEAA0, 0x240B0001) # ADDIU T3, R0, 0x0001 - else: - rom.write_int32(0x6CEAA0, 0x240B0001) # ADDIU T3, R0, 0x0001 - rom.write_int32(0x6CEAA4, 0x240D0001) # ADDIU T5, R0, 0x0001 - - # Were-bull arena flag hack - rom.write_int32(0x6E38F0, 0x0C0FF157) # JAL 0x803FC55C - rom.write_int32s(0xBFC55C, patches.werebull_flag_unsetter) - rom.write_int32(0xA949C, 0x0C0FF380) # JAL 0x803FCE00 - rom.write_int32s(0xBFCE00, patches.werebull_flag_pickup_setter) - - # Enable being able to carry multiple Special jewels, Nitros, and Mandragoras simultaneously - rom.write_int32(0xBF1F4, 0x3C038039) # LUI V1, 0x8039 - # Special1 - rom.write_int32(0xBF210, 0x80659C4B) # LB A1, 0x9C4B (V1) - rom.write_int32(0xBF214, 0x24A50001) # ADDIU A1, A1, 0x0001 - rom.write_int32(0xBF21C, 0xA0659C4B) # SB A1, 0x9C4B (V1) - # Special2 - rom.write_int32(0xBF230, 0x80659C4C) # LB A1, 0x9C4C (V1) - rom.write_int32(0xBF234, 0x24A50001) # ADDIU A1, A1, 0x0001 - rom.write_int32(0xbf23C, 0xA0659C4C) # SB A1, 0x9C4C (V1) - # Magical Nitro - rom.write_int32(0xBF360, 0x10000004) # B 0x8013C184 - rom.write_int32(0xBF378, 0x25E50001) # ADDIU A1, T7, 0x0001 - rom.write_int32(0xBF37C, 0x10000003) # B 0x8013C19C - # Mandragora - rom.write_int32(0xBF3A8, 0x10000004) # B 0x8013C1CC - rom.write_int32(0xBF3C0, 0x25050001) # ADDIU A1, T0, 0x0001 - rom.write_int32(0xBF3C4, 0x10000003) # B 0x8013C1E4 - - # Give PowerUps their Legacy of Darkness behavior when attempting to pick up more than two - rom.write_int16(0xA9624, 0x1000) - rom.write_int32(0xA9730, 0x24090000) # ADDIU T1, R0, 0x0000 - rom.write_int32(0xBF2FC, 0x080FF16D) # J 0x803FC5B4 - rom.write_int32(0xBF300, 0x00000000) # NOP - rom.write_int32s(0xBFC5B4, patches.give_powerup_stopper) - - # Rename the Wooden Stake and Rose to "You are a FOOL!" - rom.write_bytes(0xEFE34, - bytearray([0xFF, 0xFF, 0xA2, 0x0B]) + cv64_string_to_bytearray("You are a FOOL!", append_end=False)) - # Capitalize the "k" in "Archives key" to be consistent with...literally every other key name! - rom.write_byte(0xEFF21, 0x2D) - - # Skip the "There is a white jewel" text so checking one saves the game instantly. - rom.write_int32s(0xEFC72, [0x00020002 for _ in range(37)]) - rom.write_int32(0xA8FC0, 0x24020001) # ADDIU V0, R0, 0x0001 - # Skip the yes/no prompts when activating things. - rom.write_int32s(0xBFDACC, patches.map_text_redirector) - rom.write_int32(0xA9084, 0x24020001) # ADDIU V0, R0, 0x0001 - rom.write_int32(0xBEBE8, 0x0C0FF6B4) # JAL 0x803FDAD0 - # Skip Vincent and Heinrich's mandatory-for-a-check dialogue - rom.write_int32(0xBED9C, 0x0C0FF6DA) # JAL 0x803FDB68 - # Skip the long yes/no prompt in the CC planetarium to set the pieces. - rom.write_int32(0xB5C5DF, 0x24030001) # ADDIU V1, R0, 0x0001 - # Skip the yes/no prompt to activate the CC elevator. - rom.write_int32(0xB5E3FB, 0x24020001) # ADDIU V0, R0, 0x0001 - # Skip the yes/no prompts to set Nitro/Mandragora at both walls. - rom.write_int32(0xB5DF3E, 0x24030001) # ADDIU V1, R0, 0x0001 - - # Custom message if you try checking the downstairs CC crack before removing the seal. - rom.write_bytes(0xBFDBAC, cv64_string_to_bytearray("The Furious Nerd Curse\n" - "prevents you from setting\n" - "anything until the seal\n" - "is removed!", True)) - - rom.write_int32s(0xBFDD20, patches.special_descriptions_redirector) - - # Change the Stage Select menu options - rom.write_int32s(0xADF64, patches.warp_menu_rewrite) - rom.write_int32s(0x10E0C8, patches.warp_pointer_table) + s1s_per_warp = world.s1s_per_warp + + # Write all the new item/loading zone/shop/lighting/music/etc. values. + for offset, data in offset_data.items(): + patch.write_token(APTokenTypes.WRITE, offset, data) + + # Write the new Stage Select menu destinations. for i in range(len(active_warp_list)): if i == 0: - rom.write_byte(warp_map_offsets[i], get_stage_info(active_warp_list[i], "start map id")) - rom.write_byte(warp_map_offsets[i] + 4, get_stage_info(active_warp_list[i], "start spawn id")) + patch.write_token(APTokenTypes.WRITE, + warp_map_offsets[i], get_stage_info(active_warp_list[i], "start map id")) + patch.write_token(APTokenTypes.WRITE, + warp_map_offsets[i] + 4, get_stage_info(active_warp_list[i], "start spawn id")) else: - rom.write_byte(warp_map_offsets[i], get_stage_info(active_warp_list[i], "mid map id")) - rom.write_byte(warp_map_offsets[i] + 4, get_stage_info(active_warp_list[i], "mid spawn id")) - - # Play the "teleportation" sound effect when teleporting - rom.write_int32s(0xAE088, [0x08004FAB, # J 0x80013EAC - 0x2404019E]) # ADDIU A0, R0, 0x019E - - # Change the Stage Select menu's text to reflect its new purpose - rom.write_bytes(0xEFAD0, cv64_string_to_bytearray(f"Where to...?\t{active_warp_list[0]}\t" - f"`{str(s1s_per_warp).zfill(2)} {active_warp_list[1]}\t" - f"`{str(s1s_per_warp * 2).zfill(2)} {active_warp_list[2]}\t" - f"`{str(s1s_per_warp * 3).zfill(2)} {active_warp_list[3]}\t" - f"`{str(s1s_per_warp * 4).zfill(2)} {active_warp_list[4]}\t" - f"`{str(s1s_per_warp * 5).zfill(2)} {active_warp_list[5]}\t" - f"`{str(s1s_per_warp * 6).zfill(2)} {active_warp_list[6]}\t" - f"`{str(s1s_per_warp * 7).zfill(2)} {active_warp_list[7]}")) - - # Lizard-man save proofing - rom.write_int32(0xA99AC, 0x080FF0B8) # J 0x803FC2E0 - rom.write_int32s(0xBFC2E0, patches.boss_save_stopper) - - # Disable or guarantee vampire Vincent's fight - if options.vincent_fight_condition == VincentFightCondition.option_never: - rom.write_int32(0xAACC0, 0x24010001) # ADDIU AT, R0, 0x0001 - rom.write_int32(0xAACE0, 0x24180000) # ADDIU T8, R0, 0x0000 - elif options.vincent_fight_condition == VincentFightCondition.option_always: - rom.write_int32(0xAACE0, 0x24180010) # ADDIU T8, R0, 0x0010 - else: - rom.write_int32(0xAACE0, 0x24180000) # ADDIU T8, R0, 0x0000 - - # Disable or guarantee Renon's fight - rom.write_int32(0xAACB4, 0x080FF1A4) # J 0x803FC690 - if options.renon_fight_condition == RenonFightCondition.option_never: - rom.write_byte(0xB804F0, 0x00) - rom.write_byte(0xB80632, 0x00) - rom.write_byte(0xB807E3, 0x00) - rom.write_byte(0xB80988, 0xB8) - rom.write_byte(0xB816BD, 0xB8) - rom.write_byte(0xB817CF, 0x00) - rom.write_int32s(0xBFC690, patches.renon_cutscene_checker_jr) - elif options.renon_fight_condition == RenonFightCondition.option_always: - rom.write_byte(0xB804F0, 0x0C) - rom.write_byte(0xB80632, 0x0C) - rom.write_byte(0xB807E3, 0x0C) - rom.write_byte(0xB80988, 0xC4) - rom.write_byte(0xB816BD, 0xC4) - rom.write_byte(0xB817CF, 0x0C) - rom.write_int32s(0xBFC690, patches.renon_cutscene_checker_jr) - else: - rom.write_int32s(0xBFC690, patches.renon_cutscene_checker) - - # NOP the Easy Mode check when buying a thing from Renon, so he can be triggered even on this mode. - rom.write_int32(0xBD8B4, 0x00000000) - - # Disable or guarantee the Bad Ending - if options.bad_ending_condition == BadEndingCondition.option_never: - rom.write_int32(0xAEE5C6, 0x3C0A0000) # LUI T2, 0x0000 - elif options.bad_ending_condition == BadEndingCondition.option_always: - rom.write_int32(0xAEE5C6, 0x3C0A0040) # LUI T2, 0x0040 - - # Play Castle Keep's song if teleporting in front of Dracula's door outside the escape sequence - rom.write_int32(0x6E937C, 0x080FF12E) # J 0x803FC4B8 - rom.write_int32s(0xBFC4B8, patches.ck_door_music_player) - - # Increase item capacity to 100 if "Increase Item Limit" is turned on - if options.increase_item_limit: - rom.write_byte(0xBF30B, 0x63) # Most items - rom.write_byte(0xBF3F7, 0x63) # Sun/Moon cards - rom.write_byte(0xBF353, 0x64) # Keys (increase regardless) - - # Change the item healing values if "Nerf Healing" is turned on - if options.nerf_healing_items: - rom.write_byte(0xB56371, 0x50) # Healing kit (100 -> 80) - rom.write_byte(0xB56374, 0x32) # Roast beef ( 80 -> 50) - rom.write_byte(0xB56377, 0x19) # Roast chicken ( 50 -> 25) - - # Disable loading zone healing if turned off - if not options.loading_zone_heals: - rom.write_byte(0xD99A5, 0x00) # Skip all loading zone checks - rom.write_byte(0xA9DFFB, 0x40) # Disable free heal from King Skeleton by reading the unused magic meter value - - # Disable spinning on the Special1 and 2 pickup models so colorblind people can more easily identify them - rom.write_byte(0xEE4F5, 0x00) # Special1 - rom.write_byte(0xEE505, 0x00) # Special2 - # Make the Special2 the same size as a Red jewel(L) to further distinguish them - rom.write_int32(0xEE4FC, 0x3FA66666) - - # Prevent the vanilla Magical Nitro transport's "can explode" flag from setting - rom.write_int32(0xB5D7AA, 0x00000000) # NOP - - # Ensure the vampire Nitro check will always pass, so they'll never not spawn and crash the Villa cutscenes - rom.write_byte(0xA6253D, 0x03) - - # Enable the Game Over's "Continue" menu starting the cursor on whichever checkpoint is most recent - rom.write_int32(0xB4DDC, 0x0C060D58) # JAL 0x80183560 - rom.write_int32s(0x106750, patches.continue_cursor_start_checker) - rom.write_int32(0x1C444, 0x080FF08A) # J 0x803FC228 - rom.write_int32(0x1C2A0, 0x080FF08A) # J 0x803FC228 - rom.write_int32s(0xBFC228, patches.savepoint_cursor_updater) - rom.write_int32(0x1C2D0, 0x080FF094) # J 0x803FC250 - rom.write_int32s(0xBFC250, patches.stage_start_cursor_updater) - rom.write_byte(0xB585C8, 0xFF) - - # Make the Special1 and 2 play sounds when you reach milestones with them. - rom.write_int32s(0xBFDA50, patches.special_sound_notifs) - rom.write_int32(0xBF240, 0x080FF694) # J 0x803FDA50 - rom.write_int32(0xBF220, 0x080FF69E) # J 0x803FDA78 - - # Add data for White Jewel #22 (the new Duel Tower savepoint) at the end of the White Jewel ID data list - rom.write_int16s(0x104AC8, [0x0000, 0x0006, - 0x0013, 0x0015]) - - # Take the contract in Waterway off of its 00400000 bitflag. - rom.write_byte(0x87E3DA, 0x00) - - # Spawn coordinates list extension - rom.write_int32(0xD5BF4, 0x080FF103) # J 0x803FC40C - rom.write_int32s(0xBFC40C, patches.spawn_coordinates_extension) - rom.write_int32s(0x108A5E, patches.waterway_end_coordinates) - - # Change the File Select stage numbers to match the new stage order. Also fix a vanilla issue wherein saving in a - # character-exclusive stage as the other character would incorrectly display the name of that character's equivalent - # stage on the save file instead of the one they're actually in. - rom.write_byte(0xC9FE3, 0xD4) - rom.write_byte(0xCA055, 0x08) - rom.write_byte(0xCA066, 0x40) - rom.write_int32(0xCA068, 0x860C17D0) # LH T4, 0x17D0 (S0) - rom.write_byte(0xCA06D, 0x08) - rom.write_byte(0x104A31, 0x01) - rom.write_byte(0x104A39, 0x01) - rom.write_byte(0x104A89, 0x01) - rom.write_byte(0x104A91, 0x01) - rom.write_byte(0x104A99, 0x01) - rom.write_byte(0x104AA1, 0x01) - - for stage in active_stage_exits: + patch.write_token(APTokenTypes.WRITE, + warp_map_offsets[i], get_stage_info(active_warp_list[i], "mid map id")) + patch.write_token(APTokenTypes.WRITE, + warp_map_offsets[i] + 4, get_stage_info(active_warp_list[i], "mid spawn id")) + + # Change the Stage Select menu's text to reflect its new purpose. + patch.write_token(APTokenTypes.WRITE, 0xEFAD0, bytes( + cv64_string_to_bytearray(f"Where to...?\t{active_warp_list[0]}\t" + f"`{str(s1s_per_warp).zfill(2)} {active_warp_list[1]}\t" + f"`{str(s1s_per_warp * 2).zfill(2)} {active_warp_list[2]}\t" + f"`{str(s1s_per_warp * 3).zfill(2)} {active_warp_list[3]}\t" + f"`{str(s1s_per_warp * 4).zfill(2)} {active_warp_list[4]}\t" + f"`{str(s1s_per_warp * 5).zfill(2)} {active_warp_list[5]}\t" + f"`{str(s1s_per_warp * 6).zfill(2)} {active_warp_list[6]}\t" + f"`{str(s1s_per_warp * 7).zfill(2)} {active_warp_list[7]}"))) + + # Write the new File Select stage numbers. + for stage in world.active_stage_exits: for offset in get_stage_info(stage, "save number offsets"): - rom.write_byte(offset, active_stage_exits[stage]["position"]) - - # CC top elevator switch check - rom.write_int32(0x6CF0A0, 0x0C0FF0B0) # JAL 0x803FC2C0 - rom.write_int32s(0xBFC2C0, patches.elevator_flag_checker) - - # Disable time restrictions - if options.disable_time_restrictions: - # Fountain - rom.write_int32(0x6C2340, 0x00000000) # NOP - rom.write_int32(0x6C257C, 0x10000023) # B [forward 0x23] - # Rosa - rom.write_byte(0xEEAAB, 0x00) - rom.write_byte(0xEEAAD, 0x18) - # Moon doors - rom.write_int32(0xDC3E0, 0x00000000) # NOP - rom.write_int32(0xDC3E8, 0x00000000) # NOP - # Sun doors - rom.write_int32(0xDC410, 0x00000000) # NOP - rom.write_int32(0xDC418, 0x00000000) # NOP - - # Custom data-loading code - rom.write_int32(0x6B5028, 0x08060D70) # J 0x801835D0 - rom.write_int32s(0x1067B0, patches.custom_code_loader) - - # Custom remote item rewarding and DeathLink receiving code - rom.write_int32(0x19B98, 0x080FF000) # J 0x803FC000 - rom.write_int32s(0xBFC000, patches.remote_item_giver) - rom.write_int32s(0xBFE190, patches.subweapon_surface_checker) - - # Make received DeathLinks blow you to smithereens instead of kill you normally. - if options.death_link == DeathLink.option_explosive: - rom.write_int32(0x27A70, 0x10000008) # B [forward 0x08] - rom.write_int32s(0xBFC0D0, patches.deathlink_nitro_edition) - - # Set the DeathLink ROM flag if it's on at all. - if options.death_link != DeathLink.option_off: - rom.write_byte(0xBFBFDE, 0x01) - - # DeathLink counter decrementer code - rom.write_int32(0x1C340, 0x080FF8F0) # J 0x803FE3C0 - rom.write_int32s(0xBFE3C0, patches.deathlink_counter_decrementer) - rom.write_int32(0x25B6C, 0x0080FF052) # J 0x803FC148 - rom.write_int32s(0xBFC148, patches.nitro_fall_killer) - - # Death flag un-setter on "Beginning of stage" state overwrite code - rom.write_int32(0x1C2B0, 0x080FF047) # J 0x803FC11C - rom.write_int32s(0xBFC11C, patches.death_flag_unsetter) - - # Warp menu-opening code - rom.write_int32(0xB9BA8, 0x080FF099) # J 0x803FC264 - rom.write_int32s(0xBFC264, patches.warp_menu_opener) - - # NPC item textbox hack - rom.write_int32(0xBF1DC, 0x080FF904) # J 0x803FE410 - rom.write_int32(0xBF1E0, 0x27BDFFE0) # ADDIU SP, SP, -0x20 - rom.write_int32s(0xBFE410, patches.npc_item_hack) - - # Sub-weapon check function hook - rom.write_int32(0xBF32C, 0x00000000) # NOP - rom.write_int32(0xBF330, 0x080FF05E) # J 0x803FC178 - rom.write_int32s(0xBFC178, patches.give_subweapon_stopper) - - # Warp menu Special1 restriction - rom.write_int32(0xADD68, 0x0C04AB12) # JAL 0x8012AC48 - rom.write_int32s(0xADE28, patches.stage_select_overwrite) - rom.write_byte(0xADE47, s1s_per_warp) - - # Dracula's door text pointer hijack - rom.write_int32(0xD69F0, 0x080FF141) # J 0x803FC504 - rom.write_int32s(0xBFC504, patches.dracula_door_text_redirector) - - # Dracula's chamber condition - rom.write_int32(0xE2FDC, 0x0804AB25) # J 0x8012AC78 - rom.write_int32s(0xADE84, patches.special_goal_checker) - rom.write_bytes(0xBFCC48, [0xA0, 0x00, 0xFF, 0xFF, 0xA0, 0x01, 0xFF, 0xFF, 0xA0, 0x02, 0xFF, 0xFF, 0xA0, 0x03, 0xFF, - 0xFF, 0xA0, 0x04, 0xFF, 0xFF, 0xA0, 0x05, 0xFF, 0xFF, 0xA0, 0x06, 0xFF, 0xFF, 0xA0, 0x07, - 0xFF, 0xFF, 0xA0, 0x08, 0xFF, 0xFF, 0xA0, 0x09]) - if options.draculas_condition == DraculasCondition.option_crystal: - rom.write_int32(0x6C8A54, 0x0C0FF0C1) # JAL 0x803FC304 - rom.write_int32s(0xBFC304, patches.crystal_special2_giver) - rom.write_bytes(0xBFCC6E, cv64_string_to_bytearray(f"It won't budge!\n" - f"You'll need the power\n" - f"of the basement crystal\n" - f"to undo the seal.", True)) - special2_name = "Crystal " - special2_text = "The crystal is on!\n" \ - "Time to teach the old man\n" \ - "a lesson!" - elif options.draculas_condition == DraculasCondition.option_bosses: - rom.write_int32(0xBBD50, 0x080FF18C) # J 0x803FC630 - rom.write_int32s(0xBFC630, patches.boss_special2_giver) - rom.write_int32s(0xBFC55C, patches.werebull_flag_unsetter_special2_electric_boogaloo) - rom.write_bytes(0xBFCC6E, cv64_string_to_bytearray(f"It won't budge!\n" - f"You'll need to defeat\n" - f"{required_s2s} powerful monsters\n" - f"to undo the seal.", True)) - special2_name = "Trophy " - special2_text = f"Proof you killed a powerful\n" \ - f"Night Creature. Earn {required_s2s}/{total_s2s}\n" \ - f"to battle Dracula." - elif options.draculas_condition == DraculasCondition.option_specials: - special2_name = "Special2" - rom.write_bytes(0xBFCC6E, cv64_string_to_bytearray(f"It won't budge!\n" - f"You'll need to find\n" - f"{required_s2s} Special2 jewels\n" - f"to undo the seal.", True)) - special2_text = f"Need {required_s2s}/{total_s2s} to kill Dracula.\n" \ - f"Looking closely, you see...\n" \ - f"a piece of him within?" - else: - rom.write_byte(0xADE8F, 0x00) - special2_name = "Special2" - special2_text = "If you're reading this,\n" \ - "how did you get a Special2!?" - rom.write_byte(0xADE8F, required_s2s) - # Change the Special2 name depending on the setting. - rom.write_bytes(0xEFD4E, cv64_string_to_bytearray(special2_name)) - # Change the Special1 and 2 menu descriptions to tell you how many you need to unlock a warp and fight Dracula - # respectively. - special_text_bytes = cv64_string_to_bytearray(f"{s1s_per_warp} per warp unlock.\n" - f"{options.total_special1s.value} exist in total.\n" - f"Z + R + START to warp.") + cv64_string_to_bytearray(special2_text) - rom.write_bytes(0xBFE53C, special_text_bytes) - - # On-the-fly TLB script modifier - rom.write_int32s(0xBFC338, patches.double_component_checker) - rom.write_int32s(0xBFC3D4, patches.downstairs_seal_checker) - rom.write_int32s(0xBFE074, patches.mandragora_with_nitro_setter) - rom.write_int32s(0xBFC700, patches.overlay_modifiers) - - # On-the-fly actor data modifier hook - rom.write_int32(0xEAB04, 0x080FF21E) # J 0x803FC878 - rom.write_int32s(0xBFC870, patches.map_data_modifiers) - - # Fix to make flags apply to freestanding invisible items properly - rom.write_int32(0xA84F8, 0x90CC0039) # LBU T4, 0x0039 (A2) - - # Fix locked doors to check the key counters instead of their vanilla key locations' bitflags - # Pickup flag check modifications: - rom.write_int32(0x10B2D8, 0x00000002) # Left Tower Door - rom.write_int32(0x10B2F0, 0x00000003) # Storeroom Door - rom.write_int32(0x10B2FC, 0x00000001) # Archives Door - rom.write_int32(0x10B314, 0x00000004) # Maze Gate - rom.write_int32(0x10B350, 0x00000005) # Copper Door - rom.write_int32(0x10B3A4, 0x00000006) # Torture Chamber Door - rom.write_int32(0x10B3B0, 0x00000007) # ToE Gate - rom.write_int32(0x10B3BC, 0x00000008) # Science Door1 - rom.write_int32(0x10B3C8, 0x00000009) # Science Door2 - rom.write_int32(0x10B3D4, 0x0000000A) # Science Door3 - rom.write_int32(0x6F0094, 0x0000000B) # CT Door 1 - rom.write_int32(0x6F00A4, 0x0000000C) # CT Door 2 - rom.write_int32(0x6F00B4, 0x0000000D) # CT Door 3 - # Item counter decrement check modifications: - rom.write_int32(0xEDA84, 0x00000001) # Archives Door - rom.write_int32(0xEDA8C, 0x00000002) # Left Tower Door - rom.write_int32(0xEDA94, 0x00000003) # Storeroom Door - rom.write_int32(0xEDA9C, 0x00000004) # Maze Gate - rom.write_int32(0xEDAA4, 0x00000005) # Copper Door - rom.write_int32(0xEDAAC, 0x00000006) # Torture Chamber Door - rom.write_int32(0xEDAB4, 0x00000007) # ToE Gate - rom.write_int32(0xEDABC, 0x00000008) # Science Door1 - rom.write_int32(0xEDAC4, 0x00000009) # Science Door2 - rom.write_int32(0xEDACC, 0x0000000A) # Science Door3 - rom.write_int32(0xEDAD4, 0x0000000B) # CT Door 1 - rom.write_int32(0xEDADC, 0x0000000C) # CT Door 2 - rom.write_int32(0xEDAE4, 0x0000000D) # CT Door 3 - - # Fix ToE gate's "unlocked" flag in the locked door flags table - rom.write_int16(0x10B3B6, 0x0001) - - rom.write_int32(0x10AB2C, 0x8015FBD4) # Maze Gates' check code pointer adjustments - rom.write_int32(0x10AB40, 0x8015FBD4) - rom.write_int32s(0x10AB50, [0x0D0C0000, - 0x8015FBD4]) - rom.write_int32s(0x10AB64, [0x0D0C0000, - 0x8015FBD4]) - rom.write_int32s(0xE2E14, patches.normal_door_hook) - rom.write_int32s(0xBFC5D0, patches.normal_door_code) - rom.write_int32s(0x6EF298, patches.ct_door_hook) - rom.write_int32s(0xBFC608, patches.ct_door_code) - # Fix key counter not decrementing if 2 or above - rom.write_int32(0xAA0E0, 0x24020000) # ADDIU V0, R0, 0x0000 - - # Make the Easy-only candle drops in Room of Clocks appear on any difficulty - rom.write_byte(0x9B518F, 0x01) - - # Slightly move some once-invisible freestanding items to be more visible - if options.invisible_items == InvisibleItems.option_reveal_all: - rom.write_byte(0x7C7F95, 0xEF) # Forest dirge maiden statue - rom.write_byte(0x7C7FA8, 0xAB) # Forest werewolf statue - rom.write_byte(0x8099C4, 0x8C) # Villa courtyard tombstone - rom.write_byte(0x83A626, 0xC2) # Villa living room painting - # rom.write_byte(0x83A62F, 0x64) # Villa Mary's room table - rom.write_byte(0xBFCB97, 0xF5) # CC torture instrument rack - rom.write_byte(0x8C44D5, 0x22) # CC red carpet hallway knight - rom.write_byte(0x8DF57C, 0xF1) # CC cracked wall hallway flamethrower - rom.write_byte(0x90FCD6, 0xA5) # CC nitro hallway flamethrower - rom.write_byte(0x90FB9F, 0x9A) # CC invention room round machine - rom.write_byte(0x90FBAF, 0x03) # CC invention room giant famicart - rom.write_byte(0x90FE54, 0x97) # CC staircase knight (x) - rom.write_byte(0x90FE58, 0xFB) # CC staircase knight (z) - - # Change bitflag on item in upper coffin in Forest final switch gate tomb to one that's not used by something else - rom.write_int32(0x10C77C, 0x00000002) - - # Make the torch directly behind Dracula's chamber that normally doesn't set a flag set bitflag 0x08 in 0x80389BFA - rom.write_byte(0x10CE9F, 0x01) - - # Change the CC post-Behemoth boss depending on the option for Post-Behemoth Boss - if options.post_behemoth_boss == PostBehemothBoss.option_inverted: - rom.write_byte(0xEEDAD, 0x02) - rom.write_byte(0xEEDD9, 0x01) - elif options.post_behemoth_boss == PostBehemothBoss.option_always_rosa: - rom.write_byte(0xEEDAD, 0x00) - rom.write_byte(0xEEDD9, 0x03) - # Put both on the same flag so changing character won't trigger a rematch with the same boss. - rom.write_byte(0xEED8B, 0x40) - elif options.post_behemoth_boss == PostBehemothBoss.option_always_camilla: - rom.write_byte(0xEEDAD, 0x03) - rom.write_byte(0xEEDD9, 0x00) - rom.write_byte(0xEED8B, 0x40) - - # Change the RoC boss depending on the option for Room of Clocks Boss - if options.room_of_clocks_boss == RoomOfClocksBoss.option_inverted: - rom.write_byte(0x109FB3, 0x56) - rom.write_byte(0x109FBF, 0x44) - rom.write_byte(0xD9D44, 0x14) - rom.write_byte(0xD9D4C, 0x14) - elif options.room_of_clocks_boss == RoomOfClocksBoss.option_always_death: - rom.write_byte(0x109FBF, 0x44) - rom.write_byte(0xD9D45, 0x00) - # Put both on the same flag so changing character won't trigger a rematch with the same boss. - rom.write_byte(0x109FB7, 0x90) - rom.write_byte(0x109FC3, 0x90) - elif options.room_of_clocks_boss == RoomOfClocksBoss.option_always_actrise: - rom.write_byte(0x109FB3, 0x56) - rom.write_int32(0xD9D44, 0x00000000) - rom.write_byte(0xD9D4D, 0x00) - rom.write_byte(0x109FB7, 0x90) - rom.write_byte(0x109FC3, 0x90) - - # Un-nerf Actrise when playing as Reinhardt. - # This is likely a leftover TGS demo feature in which players could battle Actrise as Reinhardt. - rom.write_int32(0xB318B4, 0x240E0001) # ADDIU T6, R0, 0x0001 - - # Tunnel gondola skip - if options.skip_gondolas: - rom.write_int32(0x6C5F58, 0x080FF7D0) # J 0x803FDF40 - rom.write_int32s(0xBFDF40, patches.gondola_skipper) - # New gondola transfer point candle coordinates - rom.write_byte(0xBFC9A3, 0x04) - rom.write_bytes(0x86D824, [0x27, 0x01, 0x10, 0xF7, 0xA0]) - - # Waterway brick platforms skip - if options.skip_waterway_blocks: - rom.write_int32(0x6C7E2C, 0x00000000) # NOP - - # Ambience silencing fix - rom.write_int32(0xD9270, 0x080FF840) # J 0x803FE100 - rom.write_int32s(0xBFE100, patches.ambience_silencer) - # Fix for the door sliding sound playing infinitely if leaving the fan meeting room before the door closes entirely. - # Hooking this in the ambience silencer code does nothing for some reason. - rom.write_int32s(0xAE10C, [0x08004FAB, # J 0x80013EAC - 0x3404829B]) # ORI A0, R0, 0x829B - rom.write_int32s(0xD9E8C, [0x08004FAB, # J 0x80013EAC - 0x3404829B]) # ORI A0, R0, 0x829B - # Fan meeting room ambience fix - rom.write_int32(0x109964, 0x803FE13C) - - # Make the Villa coffin cutscene skippable - rom.write_int32(0xAA530, 0x080FF880) # J 0x803FE200 - rom.write_int32s(0xBFE200, patches.coffin_cutscene_skipper) - - # Increase shimmy speed - if options.increase_shimmy_speed: - rom.write_byte(0xA4241, 0x5A) - - # Disable landing fall damage - if options.fall_guard: - rom.write_byte(0x27B23, 0x00) - - # Enable the unused film reel effect on all cutscenes - if options.cinematic_experience: - rom.write_int32(0xAA33C, 0x240A0001) # ADDIU T2, R0, 0x0001 - rom.write_byte(0xAA34B, 0x0C) - rom.write_int32(0xAA4C4, 0x24090001) # ADDIU T1, R0, 0x0001 - - # Permanent PowerUp stuff - if options.permanent_powerups: - # Make receiving PowerUps increase the unused menu PowerUp counter instead of the one outside the save struct - rom.write_int32(0xBF2EC, 0x806B619B) # LB T3, 0x619B (V1) - rom.write_int32(0xBFC5BC, 0xA06C619B) # SB T4, 0x619B (V1) - # Make Reinhardt's whip check the menu PowerUp counter - rom.write_int32(0x69FA08, 0x80CC619B) # LB T4, 0x619B (A2) - rom.write_int32(0x69FBFC, 0x80C3619B) # LB V1, 0x619B (A2) - rom.write_int32(0x69FFE0, 0x818C9C53) # LB T4, 0x9C53 (T4) - # Make Carrie's orb check the menu PowerUp counter - rom.write_int32(0x6AC86C, 0x8105619B) # LB A1, 0x619B (T0) - rom.write_int32(0x6AC950, 0x8105619B) # LB A1, 0x619B (T0) - rom.write_int32(0x6AC99C, 0x810E619B) # LB T6, 0x619B (T0) - rom.write_int32(0x5AFA0, 0x80639C53) # LB V1, 0x9C53 (V1) - rom.write_int32(0x5B0A0, 0x81089C53) # LB T0, 0x9C53 (T0) - rom.write_byte(0x391C7, 0x00) # Prevent PowerUps from dropping from regular enemies - rom.write_byte(0xEDEDF, 0x03) # Make any vanishing PowerUps that do show up L jewels instead - # Rename the PowerUp to "PermaUp" - rom.write_bytes(0xEFDEE, cv64_string_to_bytearray("PermaUp")) - # Replace the PowerUp in the Forest Special1 Bridge 3HB rock with an L jewel if 3HBs aren't randomized - if not options.multi_hit_breakables: - rom.write_byte(0x10C7A1, 0x03) - # Change the appearance of the Pot-Pourri to that of a larger PowerUp regardless of the above setting, so other - # game PermaUps are distinguishable. - rom.write_int32s(0xEE558, [0x06005F08, 0x3FB00000, 0xFFFFFF00]) - - # Write the randomized (or disabled) music ID list and its associated code - if options.background_music: - rom.write_int32(0x14588, 0x08060D60) # J 0x80183580 - rom.write_int32(0x14590, 0x00000000) # NOP - rom.write_int32s(0x106770, patches.music_modifier) - rom.write_int32(0x15780, 0x0C0FF36E) # JAL 0x803FCDB8 - rom.write_int32s(0xBFCDB8, patches.music_comparer_modifier) - - # Enable storing item flags anywhere and changing the item model/visibility on any item instance. - rom.write_int32s(0xA857C, [0x080FF38F, # J 0x803FCE3C - 0x94D90038]) # LHU T9, 0x0038 (A2) - rom.write_int32s(0xBFCE3C, patches.item_customizer) - rom.write_int32s(0xA86A0, [0x0C0FF3AF, # JAL 0x803FCEBC - 0x95C40002]) # LHU A0, 0x0002 (T6) - rom.write_int32s(0xBFCEBC, patches.item_appearance_switcher) - rom.write_int32s(0xA8728, [0x0C0FF3B8, # JAL 0x803FCEE4 - 0x01396021]) # ADDU T4, T1, T9 - rom.write_int32s(0xBFCEE4, patches.item_model_visibility_switcher) - rom.write_int32s(0xA8A04, [0x0C0FF3C2, # JAL 0x803FCF08 - 0x018B6021]) # ADDU T4, T4, T3 - rom.write_int32s(0xBFCF08, patches.item_shine_visibility_switcher) - - # Make Axes and Crosses in AP Locations drop to their correct height, and make items with changed appearances spin - # their correct speed. - rom.write_int32s(0xE649C, [0x0C0FFA03, # JAL 0x803FE80C - 0x956C0002]) # LHU T4, 0x0002 (T3) - rom.write_int32s(0xA8B08, [0x080FFA0C, # J 0x803FE830 - 0x960A0038]) # LHU T2, 0x0038 (S0) - rom.write_int32s(0xE8584, [0x0C0FFA21, # JAL 0x803FE884 - 0x95D80000]) # LHU T8, 0x0000 (T6) - rom.write_int32s(0xE7AF0, [0x0C0FFA2A, # JAL 0x803FE8A8 - 0x958D0000]) # LHU T5, 0x0000 (T4) - rom.write_int32s(0xBFE7DC, patches.item_drop_spin_corrector) - - # 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.write_int32(0xE87F8, 0x00000000) # NOP - rom.write_int16(0xE836C, 0x1000) - rom.write_int32(0xE8B40, 0x0C0FF3CD) # JAL 0x803FCF34 - rom.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.write_int32(0xE7D54, 0x00000000) # NOP - rom.write_int16(0xE7908, 0x1000) - rom.write_byte(0xE7A5C, 0x10) - rom.write_int32(0xE7F08, 0x0C0FF3DF) # JAL 0x803FCF7C - rom.write_int32s(0xBFCF7C, patches.chandelier_item_flags_setter) - - # New flag values to put in each 3HB vanilla flag's spot - rom.write_int32(0x10C7C8, 0x8000FF48) # FoS dirge maiden rock - rom.write_int32(0x10C7B0, 0x0200FF48) # FoS S1 bridge rock - rom.write_int32(0x10C86C, 0x0010FF48) # CW upper rampart save nub - rom.write_int32(0x10C878, 0x4000FF49) # CW Dracula switch slab - rom.write_int32(0x10CAD8, 0x0100FF49) # Tunnel twin arrows slab - rom.write_int32(0x10CAE4, 0x0004FF49) # Tunnel lonesome bucket pit rock - rom.write_int32(0x10CB54, 0x4000FF4A) # UW poison parkour ledge - rom.write_int32(0x10CB60, 0x0080FF4A) # UW skeleton crusher ledge - rom.write_int32(0x10CBF0, 0x0008FF4A) # CC Behemoth crate - rom.write_int32(0x10CC2C, 0x2000FF4B) # CC elevator pedestal - rom.write_int32(0x10CC70, 0x0200FF4B) # CC lizard locker slab - rom.write_int32(0x10CD88, 0x0010FF4B) # ToE pre-midsavepoint platforms ledge - rom.write_int32(0x10CE6C, 0x4000FF4C) # ToSci invisible bridge crate - rom.write_int32(0x10CF20, 0x0080FF4C) # CT inverted battery slab - rom.write_int32(0x10CF2C, 0x0008FF4C) # CT inverted door slab - rom.write_int32(0x10CF38, 0x8000FF4D) # CT final room door slab - rom.write_int32(0x10CF44, 0x1000FF4D) # CT Renon slab - rom.write_int32(0x10C908, 0x0008FF4D) # Villa foyer chandelier - rom.write_byte(0x10CF37, 0x04) # pointer for CT final room door slab item data - - # Once-per-frame gameplay checks - rom.write_int32(0x6C848, 0x080FF40D) # J 0x803FD034 - rom.write_int32(0xBFD058, 0x0801AEB5) # J 0x8006BAD4 - - # Everything related to dropping the previous sub-weapon - if options.drop_previous_sub_weapon: - rom.write_int32(0xBFD034, 0x080FF3FF) # J 0x803FCFFC - rom.write_int32(0xBFC190, 0x080FF3F2) # J 0x803FCFC8 - rom.write_int32s(0xBFCFC4, patches.prev_subweapon_spawn_checker) - rom.write_int32s(0xBFCFFC, patches.prev_subweapon_fall_checker) - rom.write_int32s(0xBFD060, patches.prev_subweapon_dropper) - - # Everything related to the Countdown counter - if options.countdown: - rom.write_int32(0xBFD03C, 0x080FF9DC) # J 0x803FE770 - rom.write_int32(0xD5D48, 0x080FF4EC) # J 0x803FD3B0 - rom.write_int32s(0xBFD3B0, patches.countdown_number_displayer) - rom.write_int32s(0xBFD6DC, patches.countdown_number_manager) - rom.write_int32s(0xBFE770, patches.countdown_demo_hider) - rom.write_int32(0xBFCE2C, 0x080FF5D2) # J 0x803FD748 - rom.write_int32s(0xBB168, [0x080FF5F4, # J 0x803FD7D0 - 0x8E020028]) # LW V0, 0x0028 (S0) - rom.write_int32s(0xBB1D0, [0x080FF5FB, # J 0x803FD7EC - 0x8E020028]) # LW V0, 0x0028 (S0) - rom.write_int32(0xBC4A0, 0x080FF5E6) # J 0x803FD798 - rom.write_int32(0xBC4C4, 0x080FF5E6) # J 0x803FD798 - rom.write_int32(0x19844, 0x080FF602) # J 0x803FD808 - # If the option is set to "all locations", count it down no matter what the item is. - if options.countdown == Countdown.option_all_locations: - rom.write_int32s(0xBFD71C, [0x01010101, 0x01010101, 0x01010101, 0x01010101, 0x01010101, 0x01010101, - 0x01010101, 0x01010101, 0x01010101, 0x01010101, 0x01010101]) - else: - # If it's majors, then insert this last minute check I threw together for the weird edge case of a CV64 ice - # trap for another CV64 player taking the form of a major. - rom.write_int32s(0xBFD788, [0x080FF717, # J 0x803FDC5C - 0x2529FFFF]) # ADDIU T1, T1, 0xFFFF - rom.write_int32s(0xBFDC5C, patches.countdown_extra_safety_check) - rom.write_int32(0xA9ECC, 0x00000000) # NOP the pointless overwrite of the item actor appearance custom value. - - # Ice Trap stuff - rom.write_int32(0x697C60, 0x080FF06B) # J 0x803FC18C - rom.write_int32(0x6A5160, 0x080FF06B) # J 0x803FC18C - rom.write_int32s(0xBFC1AC, patches.ice_trap_initializer) - rom.write_int32s(0xBFE700, patches.the_deep_freezer) - rom.write_int32s(0xB2F354, [0x3739E4C0, # ORI T9, T9, 0xE4C0 - 0x03200008, # JR T9 - 0x00000000]) # NOP - rom.write_int32s(0xBFE4C0, patches.freeze_verifier) - - # Initial Countdown numbers - rom.write_int32(0xAD6A8, 0x080FF60A) # J 0x803FD828 - rom.write_int32s(0xBFD828, patches.new_game_extras) - - # Everything related to shopsanity - if options.shopsanity: - rom.write_byte(0xBFBFDF, 0x01) - rom.write_bytes(0x103868, cv64_string_to_bytearray("Not obtained. ")) - rom.write_int32s(0xBFD8D0, patches.shopsanity_stuff) - rom.write_int32(0xBD828, 0x0C0FF643) # JAL 0x803FD90C - rom.write_int32(0xBD5B8, 0x0C0FF651) # JAL 0x803FD944 - rom.write_int32(0xB0610, 0x0C0FF665) # JAL 0x803FD994 - rom.write_int32s(0xBD24C, [0x0C0FF677, # J 0x803FD9DC - 0x00000000]) # NOP - rom.write_int32(0xBD618, 0x0C0FF684) # JAL 0x803FDA10 - - shopsanity_name_text = [] - shopsanity_desc_text = [] + patch.write_token(APTokenTypes.WRITE, offset, bytes([world.active_stage_exits[stage]["position"]])) + + # Write all the shop text. + if world.options.shopsanity: + patch.write_token(APTokenTypes.WRITE, 0x103868, bytes(cv64_string_to_bytearray("Not obtained. "))) + + shopsanity_name_text = bytearray(0) + shopsanity_desc_text = bytearray(0) for i in range(len(shop_name_list)): shopsanity_name_text += bytearray([0xA0, i]) + shop_colors_list[i] + \ cv64_string_to_bytearray(cv64_text_truncate(shop_name_list[i], 74)) - shopsanity_desc_text += [0xA0, i] + shopsanity_desc_text += bytearray([0xA0, i]) if shop_desc_list[i][1] is not None: shopsanity_desc_text += cv64_string_to_bytearray("For " + shop_desc_list[i][1] + ".\n", append_end=False) shopsanity_desc_text += cv64_string_to_bytearray(renon_item_dialogue[shop_desc_list[i][0]]) - rom.write_bytes(0x1AD00, shopsanity_name_text) - rom.write_bytes(0x1A800, shopsanity_desc_text) - - # Panther Dash running - if options.panther_dash: - rom.write_int32(0x69C8C4, 0x0C0FF77E) # JAL 0x803FDDF8 - rom.write_int32(0x6AA228, 0x0C0FF77E) # JAL 0x803FDDF8 - rom.write_int32s(0x69C86C, [0x0C0FF78E, # JAL 0x803FDE38 - 0x3C01803E]) # LUI AT, 0x803E - rom.write_int32s(0x6AA1D0, [0x0C0FF78E, # JAL 0x803FDE38 - 0x3C01803E]) # LUI AT, 0x803E - rom.write_int32(0x69D37C, 0x0C0FF79E) # JAL 0x803FDE78 - rom.write_int32(0x6AACE0, 0x0C0FF79E) # JAL 0x803FDE78 - rom.write_int32s(0xBFDDF8, patches.panther_dash) - # Jump prevention - if options.panther_dash == PantherDash.option_jumpless: - rom.write_int32(0xBFDE2C, 0x080FF7BB) # J 0x803FDEEC - rom.write_int32(0xBFD044, 0x080FF7B1) # J 0x803FDEC4 - rom.write_int32s(0x69B630, [0x0C0FF7C6, # JAL 0x803FDF18 - 0x8CCD0000]) # LW T5, 0x0000 (A2) - rom.write_int32s(0x6A8EC0, [0x0C0FF7C6, # JAL 0x803FDF18 - 0x8CCC0000]) # LW T4, 0x0000 (A2) - # Fun fact: KCEK put separate code to handle coyote time jumping - rom.write_int32s(0x69910C, [0x0C0FF7C6, # JAL 0x803FDF18 - 0x8C4E0000]) # LW T6, 0x0000 (V0) - rom.write_int32s(0x6A6718, [0x0C0FF7C6, # JAL 0x803FDF18 - 0x8C4E0000]) # LW T6, 0x0000 (V0) - rom.write_int32s(0xBFDEC4, patches.panther_jump_preventer) - - # Everything related to Big Toss. - if options.big_toss: - rom.write_int32s(0x27E90, [0x0C0FFA38, # JAL 0x803FE8E0 - 0xAFB80074]) # SW T8, 0x0074 (SP) - rom.write_int32(0x26F54, 0x0C0FFA4D) # JAL 0x803FE934 - rom.write_int32s(0xBFE8E0, patches.big_tosser) - - # Write all the new randomized bytes. - for offset, item_id in offset_data.items(): - if item_id <= 0xFF: - rom.write_byte(offset, item_id) - elif item_id <= 0xFFFF: - rom.write_int16(offset, item_id) - elif item_id <= 0xFFFFFF: - rom.write_int24(offset, item_id) - else: - rom.write_int32(offset, item_id) + patch.write_token(APTokenTypes.WRITE, 0x1AD00, bytes(shopsanity_name_text)) + patch.write_token(APTokenTypes.WRITE, 0x1A800, bytes(shopsanity_desc_text)) - # Write the secondary name the client will use to distinguish a vanilla ROM from an AP one. - rom.write_bytes(0xBFBFD0, "ARCHIPELAGO1".encode("utf-8")) - # Write the slot authentication - rom.write_bytes(0xBFBFE0, world.auth) - - # Write the specified window colors - rom.write_byte(0xAEC23, options.window_color_r.value << 4) - rom.write_byte(0xAEC33, options.window_color_g.value << 4) - rom.write_byte(0xAEC47, options.window_color_b.value << 4) - rom.write_byte(0xAEC43, options.window_color_a.value << 4) - - # Write the item/player names for other game items + # Write the item/player names for other game items. for loc in active_locations: - if loc.address is None or get_location_info(loc.name, "type") == "shop" or loc.item.player == player: + 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] else: item_name = loc.item.name inject_address = 0xBB7164 + (256 * (loc.address & 0xFFF)) - wrapped_name, num_lines = cv64_text_wrap(item_name + "\nfor " + multiworld.get_player_name(loc.item.player), 96) - rom.write_bytes(inject_address, get_item_text_color(loc) + cv64_string_to_bytearray(wrapped_name)) - rom.write_byte(inject_address + 255, num_lines) - - # Everything relating to loading the other game items text - rom.write_int32(0xA8D8C, 0x080FF88F) # J 0x803FE23C - rom.write_int32(0xBEA98, 0x0C0FF8B4) # JAL 0x803FE2D0 - rom.write_int32(0xBEAB0, 0x0C0FF8BD) # JAL 0x803FE2F8 - rom.write_int32(0xBEACC, 0x0C0FF8C5) # JAL 0x803FE314 - rom.write_int32s(0xBFE23C, patches.multiworld_item_name_loader) - rom.write_bytes(0x10F188, [0x00 for _ in range(264)]) - rom.write_bytes(0x10F298, [0x00 for _ in range(264)]) - - # When the game normally JALs to the item prepare textbox function after the player picks up an item, set the - # "no receiving" timer to ensure the item textbox doesn't freak out if you pick something up while there's a queue - # of unreceived items. - rom.write_int32(0xA8D94, 0x0C0FF9F0) # JAL 0x803FE7C0 - rom.write_int32s(0xBFE7C0, [0x3C088039, # LUI T0, 0x8039 - 0x24090020, # ADDIU T1, R0, 0x0020 - 0x0804EDCE, # J 0x8013B738 - 0xA1099BE0]) # SB T1, 0x9BE0 (T0) - - -class CV64DeltaPatch(APDeltaPatch): - hash = CV64US10HASH - patch_file_ending: str = ".apcv64" - result_file_ending: str = ".z64" + wrapped_name, num_lines = cv64_text_wrap(item_name + "\nfor " + + world.multiworld.get_player_name(loc.item.player), 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])) - game = "Castlevania 64" - - @classmethod - def get_source_data(cls) -> bytes: - return get_base_rom_bytes() - - def patch(self, target: str): - super().patch(target) - rom = LocalRom(target) - - # Extract the item models file, decompress it, append the AP icons, compress it back, re-insert it. - items_file = lzkn64.decompress_buffer(rom.read_bytes(0x9C5310, 0x3D28)) - compressed_file = lzkn64.compress_buffer(items_file[0:0x69B6] + pkgutil.get_data(__name__, "data/ap_icons.bin")) - rom.write_bytes(0xBB2D88, compressed_file) - # Update the items' Nisitenma-Ichigo table entry to point to the new file's start and end addresses in the ROM. - rom.write_int32s(0x95F04, [0x80BB2D88, 0x00BB2D88 + len(compressed_file)]) - # Update the items' decompressed file size tables with the new file's decompressed file size. - rom.write_int16(0x95706, 0x7BF0) - rom.write_int16(0x104CCE, 0x7BF0) - # Update the Wooden Stake and Roses' item appearance settings table to point to the Archipelago item graphics. - rom.write_int16(0xEE5BA, 0x7B38) - rom.write_int16(0xEE5CA, 0x7280) - # Change the items' sizes. The progression one will be larger than the non-progression one. - rom.write_int32(0xEE5BC, 0x3FF00000) - rom.write_int32(0xEE5CC, 0x3FA00000) - rom.write_to_file(target) + # Write the secondary name the client will use to distinguish a vanilla ROM from an AP one. + patch.write_token(APTokenTypes.WRITE, 0xBFBFD0, "ARCHIPELAGO1".encode("utf-8")) + # Write the slot authentication + patch.write_token(APTokenTypes.WRITE, 0xBFBFE0, bytes(world.auth)) + + patch.write_file("token_data.bin", patch.get_token_binary()) + + # Write these slot options to a JSON. + options_dict = { + "character_stages": world.options.character_stages.value, + "vincent_fight_condition": world.options.vincent_fight_condition.value, + "renon_fight_condition": world.options.renon_fight_condition.value, + "bad_ending_condition": world.options.bad_ending_condition.value, + "increase_item_limit": world.options.increase_item_limit.value, + "nerf_healing_items": world.options.nerf_healing_items.value, + "loading_zone_heals": world.options.loading_zone_heals.value, + "disable_time_restrictions": world.options.disable_time_restrictions.value, + "death_link": world.options.death_link.value, + "draculas_condition": world.options.draculas_condition.value, + "invisible_items": world.options.invisible_items.value, + "post_behemoth_boss": world.options.post_behemoth_boss.value, + "room_of_clocks_boss": world.options.room_of_clocks_boss.value, + "skip_gondolas": world.options.skip_gondolas.value, + "skip_waterway_blocks": world.options.skip_waterway_blocks.value, + "s1s_per_warp": world.options.special1s_per_warp.value, + "required_s2s": world.required_s2s, + "total_s2s": world.total_s2s, + "total_special1s": world.options.total_special1s.value, + "increase_shimmy_speed": world.options.increase_shimmy_speed.value, + "fall_guard": world.options.fall_guard.value, + "cinematic_experience": world.options.cinematic_experience.value, + "permanent_powerups": world.options.permanent_powerups.value, + "background_music": world.options.background_music.value, + "multi_hit_breakables": world.options.multi_hit_breakables.value, + "drop_previous_sub_weapon": world.options.drop_previous_sub_weapon.value, + "countdown": world.options.countdown.value, + "shopsanity": world.options.shopsanity.value, + "panther_dash": world.options.panther_dash.value, + "big_toss": world.options.big_toss.value, + "window_color_r": world.options.window_color_r.value, + "window_color_g": world.options.window_color_g.value, + "window_color_b": world.options.window_color_b.value, + "window_color_a": world.options.window_color_a.value, + } + + patch.write_file("options.json", json.dumps(options_dict).encode('utf-8')) def get_base_rom_bytes(file_name: str = "") -> bytes: @@ -944,7 +1011,7 @@ def get_base_rom_bytes(file_name: str = "") -> bytes: basemd5 = hashlib.md5() basemd5.update(base_rom_bytes) - if CV64US10HASH != basemd5.hexdigest(): + if CV64_US_10_HASH != basemd5.hexdigest(): raise Exception("Supplied Base Rom does not match known MD5 for Castlevania 64 US 1.0." "Get the correct game and version, then dump it.") setattr(get_base_rom_bytes, "base_rom_bytes", base_rom_bytes) diff --git a/worlds/cv64/stages.py b/worlds/cv64/stages.py index a6fa6679214c..d7059b3580f2 100644 --- a/worlds/cv64/stages.py +++ b/worlds/cv64/stages.py @@ -47,9 +47,9 @@ # corresponding Locations and Entrances will all be created. stage_info = { "Forest of Silence": { - "start region": rname.forest_start, "start map id": 0x00, "start spawn id": 0x00, - "mid region": rname.forest_mid, "mid map id": 0x00, "mid spawn id": 0x04, - "end region": rname.forest_end, "end map id": 0x00, "end spawn id": 0x01, + "start region": rname.forest_start, "start map id": b"\x00", "start spawn id": b"\x00", + "mid region": rname.forest_mid, "mid map id": b"\x00", "mid spawn id": b"\x04", + "end region": rname.forest_end, "end map id": b"\x00", "end spawn id": b"\x01", "endzone map offset": 0xB6302F, "endzone spawn offset": 0xB6302B, "save number offsets": [0x1049C5, 0x1049CD, 0x1049D5], "regions": [rname.forest_start, @@ -58,9 +58,9 @@ }, "Castle Wall": { - "start region": rname.cw_start, "start map id": 0x02, "start spawn id": 0x00, - "mid region": rname.cw_start, "mid map id": 0x02, "mid spawn id": 0x07, - "end region": rname.cw_exit, "end map id": 0x02, "end spawn id": 0x10, + "start region": rname.cw_start, "start map id": b"\x02", "start spawn id": b"\x00", + "mid region": rname.cw_start, "mid map id": b"\x02", "mid spawn id": b"\x07", + "end region": rname.cw_exit, "end map id": b"\x02", "end spawn id": b"\x10", "endzone map offset": 0x109A5F, "endzone spawn offset": 0x109A61, "save number offsets": [0x1049DD, 0x1049E5, 0x1049ED], "regions": [rname.cw_start, @@ -69,9 +69,9 @@ }, "Villa": { - "start region": rname.villa_start, "start map id": 0x03, "start spawn id": 0x00, - "mid region": rname.villa_storeroom, "mid map id": 0x05, "mid spawn id": 0x04, - "end region": rname.villa_crypt, "end map id": 0x1A, "end spawn id": 0x03, + "start region": rname.villa_start, "start map id": b"\x03", "start spawn id": b"\x00", + "mid region": rname.villa_storeroom, "mid map id": b"\x05", "mid spawn id": b"\x04", + "end region": rname.villa_crypt, "end map id": b"\x1A", "end spawn id": b"\x03", "endzone map offset": 0xD9DA3, "endzone spawn offset": 0x109E81, "altzone map offset": 0xD9DAB, "altzone spawn offset": 0x109E81, "save number offsets": [0x1049F5, 0x1049FD, 0x104A05, 0x104A0D], @@ -85,9 +85,9 @@ }, "Tunnel": { - "start region": rname.tunnel_start, "start map id": 0x07, "start spawn id": 0x00, - "mid region": rname.tunnel_end, "mid map id": 0x07, "mid spawn id": 0x03, - "end region": rname.tunnel_end, "end map id": 0x07, "end spawn id": 0x11, + "start region": rname.tunnel_start, "start map id": b"\x07", "start spawn id": b"\x00", + "mid region": rname.tunnel_end, "mid map id": b"\x07", "mid spawn id": b"\x03", + "end region": rname.tunnel_end, "end map id": b"\x07", "end spawn id": b"\x11", "endzone map offset": 0x109B4F, "endzone spawn offset": 0x109B51, "character": "Reinhardt", "save number offsets": [0x104A15, 0x104A1D, 0x104A25, 0x104A2D], "regions": [rname.tunnel_start, @@ -95,9 +95,9 @@ }, "Underground Waterway": { - "start region": rname.uw_main, "start map id": 0x08, "start spawn id": 0x00, - "mid region": rname.uw_main, "mid map id": 0x08, "mid spawn id": 0x03, - "end region": rname.uw_end, "end map id": 0x08, "end spawn id": 0x01, + "start region": rname.uw_main, "start map id": b"\x08", "start spawn id": b"\x00", + "mid region": rname.uw_main, "mid map id": b"\x08", "mid spawn id": b"\x03", + "end region": rname.uw_end, "end map id": b"\x08", "end spawn id": b"\x01", "endzone map offset": 0x109B67, "endzone spawn offset": 0x109B69, "character": "Carrie", "save number offsets": [0x104A35, 0x104A3D], "regions": [rname.uw_main, @@ -105,9 +105,9 @@ }, "Castle Center": { - "start region": rname.cc_main, "start map id": 0x19, "start spawn id": 0x00, - "mid region": rname.cc_main, "mid map id": 0x0E, "mid spawn id": 0x03, - "end region": rname.cc_elev_top, "end map id": 0x0F, "end spawn id": 0x02, + "start region": rname.cc_main, "start map id": b"\x19", "start spawn id": b"\x00", + "mid region": rname.cc_main, "mid map id": b"\x0E", "mid spawn id": b"\x03", + "end region": rname.cc_elev_top, "end map id": b"\x0F", "end spawn id": b"\x02", "endzone map offset": 0x109CB7, "endzone spawn offset": 0x109CB9, "altzone map offset": 0x109CCF, "altzone spawn offset": 0x109CD1, "save number offsets": [0x104A45, 0x104A4D, 0x104A55, 0x104A5D, 0x104A65, 0x104A6D, 0x104A75], @@ -119,20 +119,20 @@ }, "Duel Tower": { - "start region": rname.dt_main, "start map id": 0x13, "start spawn id": 0x00, + "start region": rname.dt_main, "start map id": b"\x13", "start spawn id": b"\x00", "startzone map offset": 0x109DA7, "startzone spawn offset": 0x109DA9, - "mid region": rname.dt_main, "mid map id": 0x13, "mid spawn id": 0x15, - "end region": rname.dt_main, "end map id": 0x13, "end spawn id": 0x01, + "mid region": rname.dt_main, "mid map id": b"\x13", "mid spawn id": b"\x15", + "end region": rname.dt_main, "end map id": b"\x13", "end spawn id": b"\x01", "endzone map offset": 0x109D8F, "endzone spawn offset": 0x109D91, "character": "Reinhardt", "save number offsets": [0x104ACD], "regions": [rname.dt_main] }, "Tower of Execution": { - "start region": rname.toe_main, "start map id": 0x10, "start spawn id": 0x00, + "start region": rname.toe_main, "start map id": b"\x10", "start spawn id": b"\x00", "startzone map offset": 0x109D17, "startzone spawn offset": 0x109D19, - "mid region": rname.toe_main, "mid map id": 0x10, "mid spawn id": 0x02, - "end region": rname.toe_main, "end map id": 0x10, "end spawn id": 0x12, + "mid region": rname.toe_main, "mid map id": b"\x10", "mid spawn id": b"\x02", + "end region": rname.toe_main, "end map id": b"\x10", "end spawn id": b"\x12", "endzone map offset": 0x109CFF, "endzone spawn offset": 0x109D01, "character": "Reinhardt", "save number offsets": [0x104A7D, 0x104A85], "regions": [rname.toe_main, @@ -140,10 +140,10 @@ }, "Tower of Science": { - "start region": rname.tosci_start, "start map id": 0x12, "start spawn id": 0x00, + "start region": rname.tosci_start, "start map id": b"\x12", "start spawn id": b"\x00", "startzone map offset": 0x109D77, "startzone spawn offset": 0x109D79, - "mid region": rname.tosci_conveyors, "mid map id": 0x12, "mid spawn id": 0x03, - "end region": rname.tosci_conveyors, "end map id": 0x12, "end spawn id": 0x04, + "mid region": rname.tosci_conveyors, "mid map id": b"\x12", "mid spawn id": b"\x03", + "end region": rname.tosci_conveyors, "end map id": b"\x12", "end spawn id": b"\x04", "endzone map offset": 0x109D5F, "endzone spawn offset": 0x109D61, "character": "Carrie", "save number offsets": [0x104A95, 0x104A9D, 0x104AA5], "regions": [rname.tosci_start, @@ -153,28 +153,28 @@ }, "Tower of Sorcery": { - "start region": rname.tosor_main, "start map id": 0x11, "start spawn id": 0x00, + "start region": rname.tosor_main, "start map id": b"\x11", "start spawn id": b"\x00", "startzone map offset": 0x109D47, "startzone spawn offset": 0x109D49, - "mid region": rname.tosor_main, "mid map id": 0x11, "mid spawn id": 0x01, - "end region": rname.tosor_main, "end map id": 0x11, "end spawn id": 0x13, + "mid region": rname.tosor_main, "mid map id": b"\x11", "mid spawn id": b"\x01", + "end region": rname.tosor_main, "end map id": b"\x11", "end spawn id": b"\x13", "endzone map offset": 0x109D2F, "endzone spawn offset": 0x109D31, "character": "Carrie", "save number offsets": [0x104A8D], "regions": [rname.tosor_main] }, "Room of Clocks": { - "start region": rname.roc_main, "start map id": 0x1B, "start spawn id": 0x00, - "mid region": rname.roc_main, "mid map id": 0x1B, "mid spawn id": 0x02, - "end region": rname.roc_main, "end map id": 0x1B, "end spawn id": 0x14, + "start region": rname.roc_main, "start map id": b"\x1B", "start spawn id": b"\x00", + "mid region": rname.roc_main, "mid map id": b"\x1B", "mid spawn id": b"\x02", + "end region": rname.roc_main, "end map id": b"\x1B", "end spawn id": b"\x14", "endzone map offset": 0x109EAF, "endzone spawn offset": 0x109EB1, "save number offsets": [0x104AC5], "regions": [rname.roc_main] }, "Clock Tower": { - "start region": rname.ct_start, "start map id": 0x17, "start spawn id": 0x00, - "mid region": rname.ct_middle, "mid map id": 0x17, "mid spawn id": 0x02, - "end region": rname.ct_end, "end map id": 0x17, "end spawn id": 0x03, + "start region": rname.ct_start, "start map id": b"\x17", "start spawn id": b"\x00", + "mid region": rname.ct_middle, "mid map id": b"\x17", "mid spawn id": b"\x02", + "end region": rname.ct_end, "end map id": b"\x17", "end spawn id": b"\x03", "endzone map offset": 0x109E37, "endzone spawn offset": 0x109E39, "save number offsets": [0x104AB5, 0x104ABD], "regions": [rname.ct_start, @@ -183,8 +183,8 @@ }, "Castle Keep": { - "start region": rname.ck_main, "start map id": 0x14, "start spawn id": 0x02, - "mid region": rname.ck_main, "mid map id": 0x14, "mid spawn id": 0x03, + "start region": rname.ck_main, "start map id": b"\x14", "start spawn id": b"\x02", + "mid region": rname.ck_main, "mid map id": b"\x14", "mid spawn id": b"\x03", "end region": rname.ck_drac_chamber, "save number offsets": [0x104AAD], "regions": [rname.ck_main] From 2d3f3fcc2ddee64897dc8bb37a34a2ce28b820c5 Mon Sep 17 00:00:00 2001 From: Bryce Wilson Date: Thu, 18 Apr 2024 10:38:41 -0600 Subject: [PATCH 065/153] Pokemon Emerald: Fix terra/marine caves bugged internal id (#3161) --- worlds/pokemon_emerald/CHANGELOG.md | 7 +++++++ worlds/pokemon_emerald/locations.py | 2 +- 2 files changed, 8 insertions(+), 1 deletion(-) diff --git a/worlds/pokemon_emerald/CHANGELOG.md b/worlds/pokemon_emerald/CHANGELOG.md index dbc1123b7719..ec23ba5c5869 100644 --- a/worlds/pokemon_emerald/CHANGELOG.md +++ b/worlds/pokemon_emerald/CHANGELOG.md @@ -1,3 +1,10 @@ +# 2.0.1 + +### Fixes + +- Changed "Ho-oh" to "Ho-Oh" in options +- Temporarily disable a possible location for Marine Cave to spawn, as its causes an overflow + # 2.0.0 ### Features diff --git a/worlds/pokemon_emerald/locations.py b/worlds/pokemon_emerald/locations.py index 99d11db9850c..8ae891831bec 100644 --- a/worlds/pokemon_emerald/locations.py +++ b/worlds/pokemon_emerald/locations.py @@ -212,7 +212,7 @@ def set_legendary_cave_entrances(world: "PokemonEmeraldWorld") -> None: "MARINE_CAVE_ROUTE_127_1", "MARINE_CAVE_ROUTE_127_2", "MARINE_CAVE_ROUTE_129_1", - "MARINE_CAVE_ROUTE_129_2", + # "MARINE_CAVE_ROUTE_129_2", # Cave ID too high for internal data type, needs patch update ]) marine_cave_location_location = world.multiworld.get_location("MARINE_CAVE_LOCATION", world.player) From ee1e578201051829aec6115b50597b1eb9aaad3e Mon Sep 17 00:00:00 2001 From: Bryce Wilson Date: Thu, 18 Apr 2024 10:39:28 -0600 Subject: [PATCH 066/153] Pokemon Emerald: Fix client crash if 0.4.6 client connects to 0.4.5 seed (#3146) --- worlds/pokemon_emerald/__init__.py | 2 +- worlds/pokemon_emerald/client.py | 7 ++++--- 2 files changed, 5 insertions(+), 4 deletions(-) diff --git a/worlds/pokemon_emerald/__init__.py b/worlds/pokemon_emerald/__init__.py index c7f060a72969..92bad6244f96 100644 --- a/worlds/pokemon_emerald/__init__.py +++ b/worlds/pokemon_emerald/__init__.py @@ -87,7 +87,7 @@ class PokemonEmeraldWorld(World): location_name_groups = LOCATION_GROUPS data_version = 2 - required_client_version = (0, 4, 5) + required_client_version = (0, 4, 6) badge_shuffle_info: Optional[List[Tuple[PokemonEmeraldLocation, PokemonEmeraldItem]]] hm_shuffle_info: Optional[List[Tuple[PokemonEmeraldLocation, PokemonEmeraldItem]]] diff --git a/worlds/pokemon_emerald/client.py b/worlds/pokemon_emerald/client.py index 0be48261cd46..169a5a796364 100644 --- a/worlds/pokemon_emerald/client.py +++ b/worlds/pokemon_emerald/client.py @@ -87,7 +87,8 @@ ] KEY_LOCATION_FLAG_MAP = {data.locations[location_name].flag: location_name for location_name in KEY_LOCATION_FLAGS} -LEGENDARY_NAMES = { +# .lower() keys for backward compatibility between 0.4.5 and 0.4.6 +LEGENDARY_NAMES = {k.lower(): v for k, v in { "Groudon": "GROUDON", "Kyogre": "KYOGRE", "Rayquaza": "RAYQUAZA", @@ -100,7 +101,7 @@ "Deoxys": "DEOXYS", "Ho-Oh": "HO_OH", "Lugia": "LUGIA", -} +}.items()} 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()} @@ -311,7 +312,7 @@ async def game_watcher(self, ctx: "BizHawkClientContext") -> None: num_caught = 0 for legendary, is_caught in caught_legendaries.items(): - if is_caught and legendary in [LEGENDARY_NAMES[name] for name in ctx.slot_data["allowed_legendary_hunt_encounters"]]: + if is_caught and legendary in [LEGENDARY_NAMES[name.lower()] for name in ctx.slot_data["allowed_legendary_hunt_encounters"]]: num_caught += 1 if num_caught >= ctx.slot_data["legendary_hunt_count"]: From 5996a8163d8fc13b2ee67a38c7e4b3dec4633d6c Mon Sep 17 00:00:00 2001 From: PinkSwitch <52474902+PinkSwitch@users.noreply.github.com> Date: Thu, 18 Apr 2024 11:40:00 -0500 Subject: [PATCH 067/153] Yoshi's Island: Minor Fixes (#3142) --- worlds/yoshisisland/Items.py | 2 +- worlds/yoshisisland/Options.py | 4 ++-- worlds/yoshisisland/setup_game.py | 4 ++-- 3 files changed, 5 insertions(+), 5 deletions(-) diff --git a/worlds/yoshisisland/Items.py b/worlds/yoshisisland/Items.py index c97678ed4ed4..f30c7317798f 100644 --- a/worlds/yoshisisland/Items.py +++ b/worlds/yoshisisland/Items.py @@ -75,7 +75,7 @@ class ItemData(NamedTuple): "1-Up": ItemData("Lives", 0x30208C, ItemClassification.filler, 0), "2-Up": ItemData("Lives", 0x30208D, ItemClassification.filler, 0), "3-Up": ItemData("Lives", 0x30208E, ItemClassification.filler, 0), - "10-Up": ItemData("Lives", 0x30208F, ItemClassification.filler, 5), + "10-Up": ItemData("Lives", 0x30208F, ItemClassification.useful, 5), "Bonus Consumables": ItemData("Events", None, ItemClassification.progression, 0), "Bandit Consumables": ItemData("Events", None, ItemClassification.progression, 0), "Bandit Watermelons": ItemData("Events", None, ItemClassification.progression, 0), diff --git a/worlds/yoshisisland/Options.py b/worlds/yoshisisland/Options.py index d02999309f61..07d0436f6fde 100644 --- a/worlds/yoshisisland/Options.py +++ b/worlds/yoshisisland/Options.py @@ -169,12 +169,12 @@ class BossShuffle(Toggle): class LevelShuffle(Choice): """Disabled: All levels will appear in their normal location. - Bosses Guranteed: All worlds will have a boss on -4 and -8. + Bosses Guaranteed: All worlds will have a boss on -4 and -8. Full: Worlds may have more than 2 or no bosses in them. Regardless of the setting, 6-8 and Extra stages are not shuffled.""" display_name = "Level Shuffle" option_disabled = 0 - option_bosses_guranteed = 1 + option_bosses_guaranteed = 1 option_full = 2 default = 0 diff --git a/worlds/yoshisisland/setup_game.py b/worlds/yoshisisland/setup_game.py index 000420a95b07..04a35f7657b7 100644 --- a/worlds/yoshisisland/setup_game.py +++ b/worlds/yoshisisland/setup_game.py @@ -274,7 +274,7 @@ def setup_gamevars(world: "YoshisIslandWorld") -> None: norm_start_lv.extend([0x24, 0x3C]) hard_start_lv.extend([0x1D, 0x3C]) - if world.options.level_shuffle != LevelShuffle.option_bosses_guranteed: + if world.options.level_shuffle != LevelShuffle.option_bosses_guaranteed: hard_start_lv.extend([0x07, 0x1B, 0x1F, 0x2B, 0x33, 0x37]) if not world.options.shuffle_midrings: easy_start_lv.extend([0x1B]) @@ -286,7 +286,7 @@ def setup_gamevars(world: "YoshisIslandWorld") -> None: if world.options.level_shuffle: world.global_level_list.remove(starting_level) world.random.shuffle(world.global_level_list) - if world.options.level_shuffle == LevelShuffle.option_bosses_guranteed: + if world.options.level_shuffle == LevelShuffle.option_bosses_guaranteed: for i in range(11): world.global_level_list = [item for item in world.global_level_list if item not in boss_lv] From c3060a8b662f9b5dd991a9bb3252b38603d35f28 Mon Sep 17 00:00:00 2001 From: Trevor L <80716066+TRPG0@users.noreply.github.com> Date: Thu, 18 Apr 2024 10:40:53 -0600 Subject: [PATCH 068/153] Hylics 2: Update to new options API (#3147) --- worlds/hylics2/Options.py | 19 ++++++++++--------- worlds/hylics2/Rules.py | 23 ++++++++++++++--------- worlds/hylics2/__init__.py | 35 +++++++++++++++++++---------------- 3 files changed, 43 insertions(+), 34 deletions(-) diff --git a/worlds/hylics2/Options.py b/worlds/hylics2/Options.py index ac57e666a1a2..85cf36b15640 100644 --- a/worlds/hylics2/Options.py +++ b/worlds/hylics2/Options.py @@ -1,4 +1,5 @@ -from Options import Choice, Toggle, DefaultOnToggle, DeathLink +from dataclasses import dataclass +from Options import Choice, Toggle, DefaultOnToggle, DeathLink, PerGameCommonOptions class PartyShuffle(Toggle): """Shuffles party members into the pool. @@ -31,11 +32,11 @@ class Hylics2DeathLink(DeathLink): Note that this also includes death by using the PERISH gesture. Can be toggled via in-game console command "/deathlink".""" -hylics2_options = { - "party_shuffle": PartyShuffle, - "gesture_shuffle" : GestureShuffle, - "medallion_shuffle" : MedallionShuffle, - "random_start" : RandomStart, - "extra_items_in_logic": ExtraLogic, - "death_link": Hylics2DeathLink -} \ No newline at end of file +@dataclass +class Hylics2Options(PerGameCommonOptions): + party_shuffle: PartyShuffle + gesture_shuffle: GestureShuffle + medallion_shuffle: MedallionShuffle + random_start: RandomStart + extra_items_in_logic: ExtraLogic + death_link: Hylics2DeathLink \ No newline at end of file diff --git a/worlds/hylics2/Rules.py b/worlds/hylics2/Rules.py index 5fd4671958ac..2ecd14909715 100644 --- a/worlds/hylics2/Rules.py +++ b/worlds/hylics2/Rules.py @@ -129,6 +129,12 @@ def set_rules(hylics2world): world = hylics2world.multiworld player = hylics2world.player + extra = hylics2world.options.extra_items_in_logic + party = hylics2world.options.party_shuffle + medallion = hylics2world.options.medallion_shuffle + random_start = hylics2world.options.random_start + start_location = hylics2world.start_location + # Afterlife add_rule(world.get_location("Afterlife: TV", player), lambda state: cave_key(state, player)) @@ -346,7 +352,7 @@ def set_rules(hylics2world): lambda state: upper_chamber_key(state, player)) # extra rules if Extra Items in Logic is enabled - if world.extra_items_in_logic[player]: + if extra: for i in world.get_region("Foglast", player).entrances: add_rule(i, lambda state: charge_up(state, player)) for i in world.get_region("Sage Airship", player).entrances: @@ -368,7 +374,7 @@ def set_rules(hylics2world): )) # extra rules if Shuffle Party Members is enabled - if world.party_shuffle[player]: + if party: for i in world.get_region("Arcade Island", player).entrances: add_rule(i, lambda state: party_3(state, player)) for i in world.get_region("Foglast", player).entrances: @@ -406,7 +412,7 @@ def set_rules(hylics2world): lambda state: party_3(state, player)) # extra rules if Shuffle Red Medallions is enabled - if world.medallion_shuffle[player]: + if medallion: add_rule(world.get_location("New Muldul: Upper House Medallion", player), lambda state: upper_house_key(state, player)) add_rule(world.get_location("New Muldul: Vault Rear Left Medallion", player), @@ -461,7 +467,7 @@ def set_rules(hylics2world): lambda state: upper_chamber_key(state, player)) # extra rules if Shuffle Red Medallions and Party Shuffle are enabled - if world.party_shuffle[player] and world.medallion_shuffle[player]: + if party and medallion: add_rule(world.get_location("New Muldul: Vault Rear Left Medallion", player), lambda state: party_3(state, player)) add_rule(world.get_location("New Muldul: Vault Rear Right Medallion", player), @@ -493,8 +499,7 @@ def set_rules(hylics2world): add_rule(i, lambda state: enter_hylemxylem(state, player)) # random start logic (default) - if ((not world.random_start[player]) or \ - (world.random_start[player] and hylics2world.start_location == "Waynehouse")): + if not random_start or random_start and start_location == "Waynehouse": # entrances for i in world.get_region("Viewax", player).entrances: add_rule(i, lambda state: ( @@ -509,7 +514,7 @@ def set_rules(hylics2world): add_rule(i, lambda state: airship(state, player)) # random start logic (Viewax's Edifice) - elif (world.random_start[player] and hylics2world.start_location == "Viewax's Edifice"): + elif random_start and start_location == "Viewax's Edifice": for i in world.get_region("Waynehouse", player).entrances: add_rule(i, lambda state: ( air_dash(state, player) @@ -540,7 +545,7 @@ def set_rules(hylics2world): add_rule(i, lambda state: airship(state, player)) # random start logic (TV Island) - elif (world.random_start[player] and hylics2world.start_location == "TV Island"): + elif random_start and start_location == "TV Island": for i in world.get_region("Waynehouse", player).entrances: add_rule(i, lambda state: airship(state, player)) for i in world.get_region("New Muldul", player).entrances: @@ -559,7 +564,7 @@ def set_rules(hylics2world): add_rule(i, lambda state: airship(state, player)) # random start logic (Shield Facility) - elif (world.random_start[player] and hylics2world.start_location == "Shield Facility"): + elif random_start and start_location == "Shield Facility": for i in world.get_region("Waynehouse", player).entrances: add_rule(i, lambda state: airship(state, player)) for i in world.get_region("New Muldul", player).entrances: diff --git a/worlds/hylics2/__init__.py b/worlds/hylics2/__init__.py index cb7ae4498279..93ec43f842bf 100644 --- a/worlds/hylics2/__init__.py +++ b/worlds/hylics2/__init__.py @@ -1,7 +1,8 @@ from typing import Dict, List, Any from BaseClasses import Region, Entrance, Location, Item, Tutorial, ItemClassification from worlds.generic.Rules import set_rule -from . import Exits, Items, Locations, Options, Rules +from . import Exits, Items, Locations, Rules +from .Options import Hylics2Options from worlds.AutoWorld import WebWorld, World @@ -32,7 +33,9 @@ class Hylics2World(World): item_name_to_id = {data["name"]: item_id for item_id, data in all_items.items()} location_name_to_id = {data["name"]: loc_id for loc_id, data in all_locations.items()} - option_definitions = Options.hylics2_options + + options_dataclass = Hylics2Options + options: Hylics2Options data_version = 3 @@ -55,7 +58,7 @@ def create_event(self, event: str): # set random starting location if option is enabled def generate_early(self): - if self.multiworld.random_start[self.player]: + if self.options.random_start: i = self.random.randint(0, 3) if i == 0: self.start_location = "Waynehouse" @@ -77,17 +80,17 @@ def create_items(self): pool.append(self.create_item(item["name"])) # add party members if option is enabled - if self.multiworld.party_shuffle[self.player]: + if self.options.party_shuffle: for item in Items.party_item_table.values(): pool.append(self.create_item(item["name"])) # handle gesture shuffle - if not self.multiworld.gesture_shuffle[self.player]: # add gestures to pool like normal + if not self.options.gesture_shuffle: # add gestures to pool like normal for item in Items.gesture_item_table.values(): pool.append(self.create_item(item["name"])) # add '10 Bones' items if medallion shuffle is enabled - if self.multiworld.medallion_shuffle[self.player]: + if self.options.medallion_shuffle: for item in Items.medallion_item_table.values(): for _ in range(item["count"]): pool.append(self.create_item(item["name"])) @@ -98,7 +101,7 @@ def create_items(self): def pre_fill(self): # handle gesture shuffle options - if self.multiworld.gesture_shuffle[self.player] == 2: # vanilla locations + if self.options.gesture_shuffle == 2: # vanilla locations gestures = Items.gesture_item_table self.multiworld.get_location("Waynehouse: TV", self.player)\ .place_locked_item(self.create_item("POROMER BLEB")) @@ -119,13 +122,13 @@ def pre_fill(self): self.multiworld.get_location("Sage Airship: TV", self.player)\ .place_locked_item(self.create_item("BOMBO - GENESIS")) - elif self.multiworld.gesture_shuffle[self.player] == 1: # TVs only + elif self.options.gesture_shuffle == 1: # TVs only gestures = [gesture["name"] for gesture in Items.gesture_item_table.values()] tvs = [tv["name"] for tv in Locations.tv_location_table.values()] # if Extra Items in Logic is enabled place CHARGE UP first and make sure it doesn't get # placed at Sage Airship: TV or Foglast: TV - if self.multiworld.extra_items_in_logic[self.player]: + if self.options.extra_items_in_logic: tv = self.random.choice(tvs) while tv == "Sage Airship: TV" or tv == "Foglast: TV": tv = self.random.choice(tvs) @@ -144,11 +147,11 @@ def pre_fill(self): def fill_slot_data(self) -> Dict[str, Any]: slot_data: Dict[str, Any] = { - "party_shuffle": self.multiworld.party_shuffle[self.player].value, - "medallion_shuffle": self.multiworld.medallion_shuffle[self.player].value, - "random_start" : self.multiworld.random_start[self.player].value, + "party_shuffle": self.options.party_shuffle.value, + "medallion_shuffle": self.options.medallion_shuffle.value, + "random_start" : self.options.random_start.value, "start_location" : self.start_location, - "death_link": self.multiworld.death_link[self.player].value + "death_link": self.options.death_link.value } return slot_data @@ -186,7 +189,7 @@ def create_regions(self) -> None: # create entrance and connect it to parent and destination regions ent = Entrance(self.player, f"{reg.name} {k}", reg) reg.exits.append(ent) - if k == "New Game" and self.multiworld.random_start[self.player]: + if k == "New Game" and self.options.random_start: if self.start_location == "Waynehouse": ent.connect(region_table[2]) elif self.start_location == "Viewax's Edifice": @@ -209,13 +212,13 @@ def create_regions(self) -> None: .append(Hylics2Location(self.player, data["name"], i, region_table[data["region"]])) # add party member locations if option is enabled - if self.multiworld.party_shuffle[self.player]: + if self.options.party_shuffle: for i, data in Locations.party_location_table.items(): region_table[data["region"]].locations\ .append(Hylics2Location(self.player, data["name"], i, region_table[data["region"]])) # add medallion locations if option is enabled - if self.multiworld.medallion_shuffle[self.player]: + if self.options.medallion_shuffle: for i, data in Locations.medallion_location_table.items(): region_table[data["region"]].locations\ .append(Hylics2Location(self.player, data["name"], i, region_table[data["region"]])) From a91105c958f7cd47d5c159df98b6fa9798374cb5 Mon Sep 17 00:00:00 2001 From: wildham <64616385+wildham0@users.noreply.github.com> Date: Thu, 18 Apr 2024 12:42:28 -0400 Subject: [PATCH 069/153] FFMQ: Update FFMQ setup_en.md (#3091) --- worlds/ffmq/docs/setup_en.md | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/worlds/ffmq/docs/setup_en.md b/worlds/ffmq/docs/setup_en.md index de2493df74f2..35d775f1bc9f 100644 --- a/worlds/ffmq/docs/setup_en.md +++ b/worlds/ffmq/docs/setup_en.md @@ -12,7 +12,7 @@ - An SD2SNES, FXPak Pro ([FXPak Pro Store Page](https://krikzz.com/store/home/54-fxpak-pro.html)), or other compatible hardware -- Your legally obtained Final Fantasy Mystic Quest 1.1 ROM file, probably named `Final Fantasy - Mystic Quest (U) (V1.1).sfc` +- Your legally obtained Final Fantasy Mystic Quest NA 1.0 or 1.1 ROM file, probably named `Final Fantasy - Mystic Quest (U) (V1.0).sfc` or `Final Fantasy - Mystic Quest (U) (V1.1).sfc` The Archipelago community cannot supply you with this. ## Installation Procedures @@ -54,7 +54,7 @@ validator page: [YAML Validation page](/mysterycheck) 2. You will be presented with a "Seed Info" page. 3. Click the "Create New Room" link. 4. You will be presented with a server page, from which you can download your `.apmq` patch file. -5. Go to the [FFMQR website](https://ffmqrando.net/Archipelago) and select your Final Fantasy Mystic Quest 1.1 ROM +5. Go to the [FFMQR website](https://ffmqrando.net/Archipelago) and select your Final Fantasy Mystic Quest ROM and the .apmq file you received, choose optional preferences, and click `Generate` to get your patched ROM. 7. Since this is a single-player game, you will no longer need the client, so feel free to close it. @@ -66,7 +66,7 @@ When you join a multiworld game, you will be asked to provide your config file t the host will provide you with either a link to download your patch file, or with a zip file containing everyone's patch files. Your patch file should have a `.apmq` extension. -Go to the [FFMQR website](https://ffmqrando.net/Archipelago) and select your Final Fantasy Mystic Quest 1.1 ROM +Go to the [FFMQR website](https://ffmqrando.net/Archipelago) and select your Final Fantasy Mystic Quest ROM and the .apmq file you received, choose optional preferences, and click `Generate` to get your patched ROM. Manually launch the SNI Client, and run the patched ROM in your chosen software or hardware. From 6b50c91ce255fd7abf3bc548801458f670966eed Mon Sep 17 00:00:00 2001 From: Magnemania <89949176+Magnemania@users.noreply.github.com> Date: Thu, 18 Apr 2024 12:43:19 -0400 Subject: [PATCH 070/153] SM64ex: Logic and Generation Fixes (#3135) --- worlds/sm64ex/Regions.py | 10 ++++------ worlds/sm64ex/Rules.py | 25 +++++++++++++------------ 2 files changed, 17 insertions(+), 18 deletions(-) diff --git a/worlds/sm64ex/Regions.py b/worlds/sm64ex/Regions.py index 333e2df3a97f..6fc2d74b96dc 100644 --- a/worlds/sm64ex/Regions.py +++ b/worlds/sm64ex/Regions.py @@ -165,11 +165,9 @@ def create_regions(world: MultiWorld, options: SM64Options, player: int): regDDD = create_region("Dire, Dire Docks", player, world) create_locs(regDDD, "DDD: Board Bowser's Sub", "DDD: Chests in the Current", "DDD: Through the Jet Stream", - "DDD: The Manta Ray's Reward", "DDD: Collect the Caps...") - ddd_moving_poles = create_subregion(regDDD, "DDD: Moving Poles", "DDD: Pole-Jumping for Red Coins") - regDDD.subregions = [ddd_moving_poles] + "DDD: The Manta Ray's Reward", "DDD: Collect the Caps...", "DDD: Pole-Jumping for Red Coins") if options.enable_coin_stars: - create_locs(ddd_moving_poles, "DDD: 100 Coins") + create_locs(regDDD, "DDD: 100 Coins") regCotMC = create_region("Cavern of the Metal Cap", player, world) create_default_locs(regCotMC, locCotMC_table) @@ -222,9 +220,9 @@ def create_regions(world: MultiWorld, options: SM64Options, player: int): regTTC = create_region("Tick Tock Clock", player, world) create_locs(regTTC, "TTC: Stop Time for Red Coins") - ttc_lower = create_subregion(regTTC, "TTC: Lower", "TTC: Roll into the Cage", "TTC: Get a Hand", "TTC: 1Up Block Midway Up") + ttc_lower = create_subregion(regTTC, "TTC: Lower", "TTC: Roll into the Cage", "TTC: Get a Hand") ttc_upper = create_subregion(ttc_lower, "TTC: Upper", "TTC: Timed Jumps on Moving Bars", "TTC: The Pit and the Pendulums") - ttc_top = create_subregion(ttc_upper, "TTC: Top", "TTC: Stomp on the Thwomp", "TTC: 1Up Block at the Top") + ttc_top = create_subregion(ttc_upper, "TTC: Top", "TTC: 1Up Block Midway Up", "TTC: Stomp on the Thwomp", "TTC: 1Up Block at the Top") regTTC.subregions = [ttc_lower, ttc_upper, ttc_top] if options.enable_coin_stars: create_locs(ttc_top, "TTC: 100 Coins") diff --git a/worlds/sm64ex/Rules.py b/worlds/sm64ex/Rules.py index 72016b4f4014..9add8d9b2932 100644 --- a/worlds/sm64ex/Rules.py +++ b/worlds/sm64ex/Rules.py @@ -119,14 +119,14 @@ def set_rules(world, options: SM64Options, player: int, area_connections: dict, rf.assign_rule("BoB: Mario Wings to the Sky", "CANN & WC | CAPLESS & CANN") rf.assign_rule("BoB: Behind Chain Chomp's Gate", "GP | MOVELESS") # Whomp's Fortress - rf.assign_rule("WF: Tower", "{{WF: Chip Off Whomp's Block}}") + rf.assign_rule("WF: Tower", "GP") rf.assign_rule("WF: Chip Off Whomp's Block", "GP") rf.assign_rule("WF: Shoot into the Wild Blue", "WK & TJ/SF | CANN") rf.assign_rule("WF: Fall onto the Caged Island", "CL & {WF: Tower} | MOVELESS & TJ | MOVELESS & LJ | MOVELESS & CANN") rf.assign_rule("WF: Blast Away the Wall", "CANN | CANNLESS & LG") # Jolly Roger Bay rf.assign_rule("JRB: Upper", "TJ/BF/SF/WK | MOVELESS & LG") - rf.assign_rule("JRB: Red Coins on the Ship Afloat", "CL/CANN/TJ/BF/WK") + rf.assign_rule("JRB: Red Coins on the Ship Afloat", "CL/CANN/TJ | MOVELESS & BF/WK") rf.assign_rule("JRB: Blast to the Stone Pillar", "CANN+CL | CANNLESS & MOVELESS | CANN & MOVELESS") rf.assign_rule("JRB: Through the Jet Stream", "MC | CAPLESS") # Cool, Cool Mountain @@ -147,9 +147,10 @@ def set_rules(world, options: SM64Options, player: int, area_connections: dict, rf.assign_rule("LLL: Upper Volcano", "CL") # Shifting Sand Land rf.assign_rule("SSL: Upper Pyramid", "CL & TJ/BF/SF/LG | MOVELESS") - rf.assign_rule("SSL: Free Flying for 8 Red Coins", "TJ/SF/BF & TJ+WC | TJ/SF/BF & CAPLESS | MOVELESS & CAPLESS") + rf.assign_rule("SSL: Stand Tall on the Four Pillars", "TJ+WC+GP | CANN+WC+GP | TJ/SF/BF & CAPLESS | MOVELESS") + rf.assign_rule("SSL: Free Flying for 8 Red Coins", "TJ+WC | CANN+WC | TJ/SF/BF & CAPLESS | MOVELESS & CAPLESS") # Dire, Dire Docks - rf.assign_rule("DDD: Moving Poles", "CL & {{Bowser in the Fire Sea Key}} | TJ+DV+LG+WK & MOVELESS") + rf.assign_rule("DDD: Pole-Jumping for Red Coins", "CL & {{Bowser in the Fire Sea Key}} | TJ+DV+LG+WK & MOVELESS") rf.assign_rule("DDD: Through the Jet Stream", "MC | CAPLESS") rf.assign_rule("DDD: Collect the Caps...", "VC+MC | CAPLESS & VC") # Snowman's Land @@ -173,15 +174,14 @@ def set_rules(world, options: SM64Options, player: int, area_connections: dict, rf.assign_rule("THI: Make Wiggler Squirm", "GP | MOVELESS & DV") # Tick Tock Clock rf.assign_rule("TTC: Lower", "LG/TJ/SF/BF/WK") - rf.assign_rule("TTC: Upper", "CL | SF+WK") - rf.assign_rule("TTC: Top", "CL | SF+WK") - rf.assign_rule("TTC: Stomp on the Thwomp", "LG & TJ/SF/BF") + rf.assign_rule("TTC: Upper", "CL | MOVELESS & WK") + rf.assign_rule("TTC: Top", "TJ+LG | MOVELESS & WK/TJ") rf.assign_rule("TTC: Stop Time for Red Coins", "NAR | {TTC: Lower}") # Rainbow Ride rf.assign_rule("RR: Maze", "WK | LJ & SF/BF/TJ | MOVELESS & LG/TJ") rf.assign_rule("RR: Bob-omb Buddy", "WK | MOVELESS & LG") - rf.assign_rule("RR: Swingin' in the Breeze", "LG/TJ/BF/SF") - rf.assign_rule("RR: Tricky Triangles!", "LG/TJ/BF/SF") + rf.assign_rule("RR: Swingin' in the Breeze", "LG/TJ/BF/SF | MOVELESS") + rf.assign_rule("RR: Tricky Triangles!", "LG/TJ/BF/SF | MOVELESS") rf.assign_rule("RR: Cruiser", "WK/SF/BF/LG/TJ") rf.assign_rule("RR: House", "TJ/SF/BF/LG") rf.assign_rule("RR: Somewhere Over the Rainbow", "CANN") @@ -206,8 +206,8 @@ def set_rules(world, options: SM64Options, player: int, area_connections: dict, rf.assign_rule("JRB: 100 Coins", "GP & {JRB: Upper}") rf.assign_rule("HMC: 100 Coins", "GP") rf.assign_rule("SSL: 100 Coins", "{SSL: Upper Pyramid} | GP") - rf.assign_rule("DDD: 100 Coins", "GP") - rf.assign_rule("SL: 100 Coins", "VC | MOVELESS") + rf.assign_rule("DDD: 100 Coins", "GP & {{DDD: Pole-Jumping for Red Coins}}") + rf.assign_rule("SL: 100 Coins", "VC | CAPLESS") rf.assign_rule("WDW: 100 Coins", "GP | {WDW: Downtown}") rf.assign_rule("TTC: 100 Coins", "GP") rf.assign_rule("THI: 100 Coins", "GP") @@ -246,6 +246,7 @@ class RuleFactory: token_table = { "TJ": "Triple Jump", + "DJ": "Triple Jump", "LJ": "Long Jump", "BF": "Backflip", "SF": "Side Flip", @@ -270,7 +271,7 @@ def __init__(self, world, options: SM64Options, player: int, move_rando_bitvec: self.area_randomizer = options.area_rando > 0 self.capless = not options.strict_cap_requirements self.cannonless = not options.strict_cannon_requirements - self.moveless = not options.strict_move_requirements or not move_rando_bitvec > 0 + self.moveless = not options.strict_move_requirements def assign_rule(self, target_name: str, rule_expr: str): target = self.world.get_location(target_name, self.player) if target_name in location_table else self.world.get_entrance(target_name, self.player) From 740b76ebd56292152f396476f9cdd905c500e245 Mon Sep 17 00:00:00 2001 From: Star Rauchenberger Date: Thu, 18 Apr 2024 11:45:33 -0500 Subject: [PATCH 071/153] Lingo: The Pilgrim Update (#2884) * An option was added to enable or disable the pilgrimage, and it defaults to disabled. When disabled, the client will prevent you from performing a pilgrimage (i.e. the yellow border will not appear when you enter the 1 sunwarp). The sun painting is added to the item pool when pilgrimage is disabled, as otherwise there is no way into the Pilgrim Antechamber. Inversely, the sun painting is no longer in the item pool when pilgrimage is enabled (even if door shuffle is on), requiring you to perform a pilgrimage to get to that room. * The canonical pilgrimage has been deprecated. Instead, there is logic for determining whether a pilgrimage is possible. * Two options were added that allow the player to decide whether paintings and/or Crossroads - Roof Access are permitted during the pilgrimage. Both default to disabled. These options apply both to logical expectations in the generator, and are also enforced by the game client. * An option was added to control how sunwarps are accessed. The default is for them to always be accessible, like in the base game. It is also possible to disable them entirely (which is not possible when pilgrimage is enabled), or lock them behind items similar to door shuffle. It can either be one item that unlocks all sunwarps at the same time, six progressive items that unlock the sunwarps from 1 to 6, or six individual items that unlock the sunwarps in any order. This option is independent from door shuffle. * An option was added that shuffles sunwarps. This acts similarly to painting shuffle. The 12 sunwarps are re-ordered and re-paired. Sunwarps that were previously entrances or exits do not need to stay entrances or exits. Performing a pilgrimage requires proceeding through the sunwarps in the new order, rather than the original one. * Pilgrimage was added as a win condition. It requires you to solve the blue PILGRIM panel in the Pilgrim Antechamber. --- worlds/lingo/__init__.py | 6 +- worlds/lingo/data/LL1.yaml | 587 ++++++++++++++++------- worlds/lingo/data/generated.dat | Bin 130691 -> 135088 bytes worlds/lingo/data/ids.yaml | 35 +- worlds/lingo/datatypes.py | 19 +- worlds/lingo/items.py | 39 +- worlds/lingo/locations.py | 2 +- worlds/lingo/options.py | 47 +- worlds/lingo/player_logic.py | 106 ++-- worlds/lingo/regions.py | 105 +++- worlds/lingo/rules.py | 4 + worlds/lingo/static_logic.py | 8 +- worlds/lingo/test/TestOptions.py | 20 + worlds/lingo/test/TestPilgrimage.py | 114 +++++ worlds/lingo/test/TestSunwarps.py | 213 ++++++++ worlds/lingo/utils/pickle_static_data.py | 96 ++-- worlds/lingo/utils/validate_config.rb | 48 +- 17 files changed, 1152 insertions(+), 297 deletions(-) create mode 100644 worlds/lingo/test/TestPilgrimage.py create mode 100644 worlds/lingo/test/TestSunwarps.py diff --git a/worlds/lingo/__init__.py b/worlds/lingo/__init__.py index 25be16699126..537b149f16ed 100644 --- a/worlds/lingo/__init__.py +++ b/worlds/lingo/__init__.py @@ -132,7 +132,8 @@ def set_rules(self): def fill_slot_data(self): slot_options = [ "death_link", "victory_condition", "shuffle_colors", "shuffle_doors", "shuffle_paintings", "shuffle_panels", - "mastery_achievements", "level_2_requirement", "location_checks", "early_color_hallways" + "enable_pilgrimage", "sunwarp_access", "mastery_achievements", "level_2_requirement", "location_checks", + "early_color_hallways", "pilgrimage_allows_roof_access", "pilgrimage_allows_paintings", "shuffle_sunwarps" ] slot_data = { @@ -143,6 +144,9 @@ def fill_slot_data(self): if self.options.shuffle_paintings: slot_data["painting_entrance_to_exit"] = self.player_logic.painting_mapping + if self.options.shuffle_sunwarps: + slot_data["sunwarp_permutation"] = self.player_logic.sunwarp_mapping + return slot_data def get_filler_item_name(self) -> str: diff --git a/worlds/lingo/data/LL1.yaml b/worlds/lingo/data/LL1.yaml index f2d2a9ff5448..c33cad393bba 100644 --- a/worlds/lingo/data/LL1.yaml +++ b/worlds/lingo/data/LL1.yaml @@ -54,6 +54,8 @@ # this door will open the doors listed here. # - painting_id: An internal ID of a painting that should be moved upon # receiving this door. + # - warp_id: An internal ID or IDs of warps that should be disabled + # until receiving this door. # - panels: These are the panels that canonically open this door. If # there is only one panel for the door, then that panel is a # check. If there is more than one panel, then that entire @@ -73,10 +75,6 @@ # will be covered by a single item. # - include_reduce: Door checks are assumed to be EXCLUDED when reduce checks # is on. This option includes the check anyway. - # - junk_item: If on, the item for this door will be considered a junk - # item instead of a progression item. Only use this for - # doors that could never gate progression regardless of - # options and state. # - event: Denotes that the door is event only. This is similar to # setting both skip_location and skip_item. # @@ -106,9 +104,42 @@ # Use "req_blocked_when_no_doors" instead if it would be # fine in door shuffle mode. # - move: Denotes that the painting is able to move. + # + # sunwarps is an array of sunwarps in the room. This is used for sunwarp + # shuffling. + # - dots: The number of dots on this sunwarp. + # - direction: "enter" or "exit" + # - entrance_indicator_pos: Coordinates for where the entrance indicator + # should be placed if this becomes an entrance. + # - orientation: One of north/south/east/west. Starting Room: entrances: - Menu: True + Menu: + warp: True + Outside The Wise: + painting: True + Rhyme Room (Circle): + painting: True + Rhyme Room (Target): + painting: True + Wondrous Lobby: + painting: True + Orange Tower Third Floor: + painting: True + Color Hunt: + painting: True + Owl Hallway: + painting: True + The Wondrous: + room: The Wondrous + door: Exit + painting: True + Orange Tower Sixth Floor: + painting: True + Orange Tower Basement: + painting: True + The Colorful: + painting: True panels: HI: id: Entry Room/Panel_hi_hi @@ -416,7 +447,7 @@ The Traveled: door: Traveled Entrance Roof: True # through the sunwarp - Outside The Undeterred: # (NOTE: used in hardcoded pilgrimage) + Outside The Undeterred: room: Outside The Undeterred door: Green Painting painting: True @@ -500,6 +531,11 @@ paintings: - id: maze_painting orientation: west + sunwarps: + - dots: 1 + direction: enter + entrance_indicator_pos: [18, 2.5, -17.01] + orientation: north Dead End Area: entrances: Hidden Room: @@ -526,12 +562,52 @@ paintings: - id: smile_painting_6 orientation: north - Pilgrim Antechamber: - # Let's not shuffle the paintings yet. + Sunwarps: + # This is a special, meta-ish room. entrances: - # The pilgrimage is hardcoded in rules.py - Starting Room: - door: Sun Painting + Menu: True + doors: + 1 Sunwarp: + warp_id: Teleporter Warps/Sunwarp_enter_1 + door_group: Sunwarps + skip_location: True + item_name: "1 Sunwarp" + 2 Sunwarp: + warp_id: Teleporter Warps/Sunwarp_enter_2 + door_group: Sunwarps + skip_location: True + item_name: 2 Sunwarp + 3 Sunwarp: + warp_id: Teleporter Warps/Sunwarp_enter_3 + door_group: Sunwarps + skip_location: True + item_name: "3 Sunwarp" + 4 Sunwarp: + warp_id: Teleporter Warps/Sunwarp_enter_4 + door_group: Sunwarps + skip_location: True + item_name: 4 Sunwarp + 5 Sunwarp: + warp_id: Teleporter Warps/Sunwarp_enter_5 + door_group: Sunwarps + skip_location: True + item_name: "5 Sunwarp" + 6 Sunwarp: + warp_id: Teleporter Warps/Sunwarp_enter_6 + door_group: Sunwarps + skip_location: True + item_name: "6 Sunwarp" + progression: + Progressive Pilgrimage: + - 1 Sunwarp + - 2 Sunwarp + - 3 Sunwarp + - 4 Sunwarp + - 5 Sunwarp + - 6 Sunwarp + Pilgrim Antechamber: + # The entrances to this room are special. When pilgrimage is enabled, we use a special access rule to determine + # whether a pilgrimage can succeed. When pilgrimage is disabled, the sun painting will be added to the pool. panels: HOT CRUST: id: Lingo Room/Panel_shortcut @@ -541,6 +617,7 @@ id: Lingo Room/Panel_pilgrim colors: blue tag: midblue + check: True MASTERY: id: Master Room/Panel_mastery_mastery14 tag: midwhite @@ -636,11 +713,19 @@ - THIS Crossroads: entrances: - Hub Room: True # The sunwarp means that we never need the ORDER door - Color Hallways: True + Hub Room: + - room: Sunwarps + door: 1 Sunwarp + sunwarp: True + - room: Hub Room + door: Crossroads Entrance + Color Hallways: + warp: True The Tenacious: door: Tenacious Entrance - Orange Tower Fourth Floor: True # through IRK HORN + Orange Tower Fourth Floor: + - warp: True # through IRK HORN + - door: Tower Entrance Amen Name Area: room: Lost Area door: Exit @@ -760,7 +845,6 @@ - SWORD Eye Wall: id: Shuffle Room Area Doors/Door_behind - junk_item: True door_group: Crossroads Doors panels: - BEND HI @@ -795,6 +879,11 @@ door: Eye Wall - id: smile_painting_4 orientation: south + sunwarps: + - dots: 1 + direction: exit + entrance_indicator_pos: [ -17, 2.5, -41.01 ] + orientation: north Lost Area: entrances: Outside The Agreeable: @@ -1036,11 +1125,12 @@ - LEAF - FEEL Outside The Agreeable: - # Let's ignore the blue warp thing for now because the lookout is a dead - # end. Later on it could be filler checks. entrances: - # We don't have to list Lost Area because of Crossroads. - Crossroads: True + Crossroads: + warp: True + Lost Area: + room: Lost Area + door: Exit The Tenacious: door: Tenacious Entrance The Agreeable: @@ -1053,12 +1143,11 @@ Starting Room: door: Painting Shortcut painting: True - Hallway Room (2): True - Hallway Room (3): True - Hallway Room (4): True + Hallway Room (1): + warp: True Hedge Maze: True # through the door to the sectioned-off part of the hedge maze - Cellar: - door: Lookout Entrance + Compass Room: + warp: True panels: MASSACRED: id: Palindrome Room/Panel_massacred_sacred @@ -1104,11 +1193,6 @@ required_door: room: Outside The Undeterred door: Fives - OUT: - id: Hallway Room/Panel_out_out - check: True - exclude_reduce: True - tag: midwhite HIDE: id: Maze Room/Panel_hide_seek_4 colors: black @@ -1117,52 +1201,6 @@ id: Maze Room/Panel_daze_maze colors: purple tag: midpurp - WALL: - id: Hallway Room/Panel_castle_1 - colors: blue - tag: quad bot blue - link: qbb CASTLE - KEEP: - id: Hallway Room/Panel_castle_2 - colors: blue - tag: quad bot blue - link: qbb CASTLE - BAILEY: - id: Hallway Room/Panel_castle_3 - colors: blue - tag: quad bot blue - link: qbb CASTLE - TOWER: - id: Hallway Room/Panel_castle_4 - colors: blue - tag: quad bot blue - link: qbb CASTLE - NORTH: - id: Cross Room/Panel_north_missing - colors: green - tag: forbid - required_panel: - - room: Outside The Bold - panel: SOUND - - room: Outside The Bold - panel: YEAST - - room: Outside The Bold - panel: WET - DIAMONDS: - id: Cross Room/Panel_diamonds_missing - colors: green - tag: forbid - required_room: Suits Area - FIRE: - id: Cross Room/Panel_fire_missing - colors: green - tag: forbid - required_room: Elements Area - WINTER: - id: Cross Room/Panel_winter_missing - colors: green - tag: forbid - required_room: Orange Tower Fifth Floor doors: Tenacious Entrance: id: Palindrome Room Area Doors/Door_massacred_sacred @@ -1194,15 +1232,49 @@ panels: - room: Color Hunt panel: PURPLE - Hallway Door: - id: Red Blue Purple Room Area Doors/Door_room_2 - door_group: Hallway Room Doors - location_name: Hallway Room - First Room - panels: - - WALL - - KEEP - - BAILEY - - TOWER + paintings: + - id: eyes_yellow_painting + orientation: east + sunwarps: + - dots: 6 + direction: enter + entrance_indicator_pos: [ 3, 2.5, -55.01 ] + orientation: north + Compass Room: + entrances: + Outside The Agreeable: + warp: True + Cellar: + door: Lookout Entrance + warp: True + panels: + NORTH: + id: Cross Room/Panel_north_missing + colors: green + tag: forbid + required_panel: + - room: Outside The Bold + panel: SOUND + - room: Outside The Bold + panel: YEAST + - room: Outside The Bold + panel: WET + DIAMONDS: + id: Cross Room/Panel_diamonds_missing + colors: green + tag: forbid + required_room: Suits Area + FIRE: + id: Cross Room/Panel_fire_missing + colors: green + tag: forbid + required_room: Elements Area + WINTER: + id: Cross Room/Panel_winter_missing + colors: green + tag: forbid + required_room: Orange Tower Fifth Floor + doors: Lookout Entrance: id: Cross Room Doors/Door_missing location_name: Outside The Agreeable - Lookout Panels @@ -1212,21 +1284,8 @@ - DIAMONDS - FIRE paintings: - - id: panda_painting - orientation: south - - id: eyes_yellow_painting - orientation: east - id: pencil_painting7 orientation: north - progression: - Progressive Hallway Room: - - Hallway Door - - room: Hallway Room (2) - door: Exit - - room: Hallway Room (3) - door: Exit - - room: Hallway Room (4) - door: Exit Dread Hallway: entrances: Outside The Agreeable: @@ -1321,7 +1380,8 @@ Hub Room: room: Hub Room door: Shortcut to Hedge Maze - Color Hallways: True + Color Hallways: + warp: True The Agreeable: room: The Agreeable door: Shortcut to Hedge Maze @@ -1465,7 +1525,8 @@ orientation: north The Fearless (First Floor): entrances: - The Perceptive: True + The Perceptive: + warp: True panels: SPAN: id: Naps Room/Panel_naps_span @@ -1508,6 +1569,7 @@ The Fearless (First Floor): room: The Fearless (First Floor) door: Second Floor + warp: True panels: NONE: id: Naps Room/Panel_one_many @@ -1557,6 +1619,7 @@ The Fearless (First Floor): room: The Fearless (Second Floor) door: Third Floor + warp: True panels: Achievement: id: Countdown Panels/Panel_fearless_fearless @@ -1585,7 +1648,8 @@ Hedge Maze: room: Hedge Maze door: Observant Entrance - The Incomparable: True + The Incomparable: + warp: True panels: Achievement: id: Countdown Panels/Panel_observant_observant @@ -1709,7 +1773,8 @@ - SIX The Incomparable: entrances: - The Observant: True # Assuming that access to The Observant includes access to the right entrance + The Observant: + warp: True Eight Room: True Eight Alcove: door: Eight Door @@ -1911,9 +1976,11 @@ Outside The Wanderer: room: Outside The Wanderer door: Tower Entrance + warp: True Orange Tower Second Floor: room: Orange Tower door: Second Floor + warp: True Directional Gallery: door: Salt Pepper Door Roof: True # through the sunwarp @@ -1944,15 +2011,23 @@ - SALT - room: Directional Gallery panel: PEPPER + sunwarps: + - dots: 4 + direction: enter + entrance_indicator_pos: [ -32, 2.5, -14.99 ] + orientation: south Orange Tower Second Floor: entrances: Orange Tower First Floor: room: Orange Tower door: Second Floor + warp: True Orange Tower Third Floor: room: Orange Tower door: Third Floor - Outside The Undeterred: True + warp: True + Outside The Undeterred: + warp: True Orange Tower Third Floor: entrances: Knight Night Exit: @@ -1961,16 +2036,22 @@ Orange Tower Second Floor: room: Orange Tower door: Third Floor + warp: True Orange Tower Fourth Floor: room: Orange Tower door: Fourth Floor - Hot Crusts Area: True # sunwarp - Bearer Side Area: # This is complicated because of The Bearer's topology + warp: True + Hot Crusts Area: + room: Sunwarps + door: 2 Sunwarp + sunwarp: True + Bearer Side Area: room: Bearer Side Area door: Shortcut to Tower Rhyme Room (Smiley): door: Rhyme Room Entrance - Art Gallery: True # mark this as a warp in the sunwarps branch + Art Gallery: + warp: True panels: RED: id: Color Arrow Room/Panel_red_afar @@ -2019,14 +2100,25 @@ orientation: east - id: flower_painting_5 orientation: south + sunwarps: + - dots: 2 + direction: exit + entrance_indicator_pos: [ 24.01, 2.5, 38 ] + orientation: west + - dots: 3 + direction: enter + entrance_indicator_pos: [ 28.01, 2.5, 29 ] + orientation: west Orange Tower Fourth Floor: entrances: Orange Tower Third Floor: room: Orange Tower door: Fourth Floor + warp: True Orange Tower Fifth Floor: room: Orange Tower door: Fifth Floor + warp: True Hot Crusts Area: door: Hot Crusts Door Crossroads: @@ -2034,7 +2126,10 @@ door: Tower Entrance - room: Crossroads door: Tower Back Entrance - Courtyard: True + Courtyard: + - warp: True + - room: Crossroads + door: Tower Entrance Roof: True # through the sunwarp panels: RUNT (1): @@ -2067,6 +2162,11 @@ id: Shuffle Room Area Doors/Door_hotcrust_shortcuts panels: - HOT CRUSTS + sunwarps: + - dots: 5 + direction: enter + entrance_indicator_pos: [ -20, 3, -64.01 ] + orientation: north Hot Crusts Area: entrances: Orange Tower Fourth Floor: @@ -2084,28 +2184,31 @@ paintings: - id: smile_painting_8 orientation: north + sunwarps: + - dots: 2 + direction: enter + entrance_indicator_pos: [ -26, 3.5, -80.01 ] + orientation: north Orange Tower Fifth Floor: entrances: Orange Tower Fourth Floor: room: Orange Tower door: Fifth Floor + warp: True Orange Tower Sixth Floor: room: Orange Tower door: Sixth Floor + warp: True Cellar: room: Room Room door: Cellar Exit + warp: True Welcome Back Area: door: Welcome Back - Art Gallery: - room: Art Gallery - door: Exit - The Bearer: - room: Art Gallery - door: Exit Outside The Initiated: room: Art Gallery door: Exit + warp: True panels: SIZE (Small): id: Entry Room/Panel_size_small @@ -2185,6 +2288,7 @@ Orange Tower Fifth Floor: room: Orange Tower door: Sixth Floor + warp: True The Scientific: painting: True paintings: @@ -2213,6 +2317,7 @@ Orange Tower Sixth Floor: room: Orange Tower door: Seventh Floor + warp: True panels: THE END: id: EndPanel/Panel_end_end @@ -2389,7 +2494,10 @@ Courtyard: entrances: Roof: True - Orange Tower Fourth Floor: True + Orange Tower Fourth Floor: + - warp: True + - room: Crossroads + door: Tower Entrance Arrow Garden: painting: True Starting Room: @@ -2757,15 +2865,24 @@ entrances: Starting Room: door: Shortcut to Starting Room - Hub Room: True - Outside The Wondrous: True - Outside The Undeterred: True - Outside The Agreeable: True - Outside The Wanderer: True - The Observant: True - Art Gallery: True - The Scientific: True - Cellar: True + Hub Room: + warp: True + Outside The Wondrous: + warp: True + Outside The Undeterred: + warp: True + Outside The Agreeable: + warp: True + Outside The Wanderer: + warp: True + The Observant: + warp: True + Art Gallery: + warp: True + The Scientific: + warp: True + Cellar: + warp: True Orange Tower Fifth Floor: room: Orange Tower Fifth Floor door: Welcome Back @@ -2833,10 +2950,21 @@ Knight Night Exit: room: Knight Night (Final) door: Exit - Orange Tower Third Floor: True # sunwarp + Orange Tower Third Floor: + room: Sunwarps + door: 3 Sunwarp + sunwarp: True Orange Tower Fifth Floor: room: Art Gallery door: Exit + warp: True + Art Gallery: + room: Art Gallery + door: Exit + warp: True + The Bearer: + room: Art Gallery + door: Exit Eight Alcove: door: Eight Door The Optimistic: True @@ -3007,6 +3135,11 @@ orientation: east - id: smile_painting_1 orientation: north + sunwarps: + - dots: 3 + direction: exit + entrance_indicator_pos: [ 89.99, 2.5, 1 ] + orientation: east The Initiated: entrances: Outside The Initiated: @@ -3130,6 +3263,7 @@ door: Traveled Entrance Color Hallways: door: Color Hallways Entrance + warp: True panels: Achievement: id: Countdown Panels/Panel_traveled_traveled @@ -3220,22 +3354,32 @@ The Traveled: room: The Traveled door: Color Hallways Entrance - Outside The Bold: True - Outside The Undeterred: True - Crossroads: True - Hedge Maze: True - The Optimistic: True # backside - Directional Gallery: True # backside - Yellow Backside Area: True + Outside The Bold: + warp: True + Outside The Undeterred: + warp: True + Crossroads: + warp: True + Hedge Maze: + warp: True + The Optimistic: + warp: True # backside + Directional Gallery: + warp: True # backside + Yellow Backside Area: + warp: True The Bearer: room: The Bearer door: Backside Door + warp: True The Observant: room: The Observant door: Backside Door + warp: True Outside The Bold: entrances: - Color Hallways: True + Color Hallways: + warp: True Color Hunt: room: Color Hunt door: Shortcut to The Steady @@ -3253,7 +3397,7 @@ door: Painting Shortcut painting: True Room Room: True # trapdoor - Outside The Agreeable: + Compass Room: painting: True panels: UNOPEN: @@ -3455,13 +3599,22 @@ tag: botred Outside The Undeterred: entrances: - Color Hallways: True - Orange Tower First Floor: True # sunwarp - Orange Tower Second Floor: True - The Artistic (Smiley): True - The Artistic (Panda): True - The Artistic (Apple): True - The Artistic (Lattice): True + Color Hallways: + warp: True + Orange Tower First Floor: + room: Sunwarps + door: 4 Sunwarp + sunwarp: True + Orange Tower Second Floor: + warp: True + The Artistic (Smiley): + warp: True + The Artistic (Panda): + warp: True + The Artistic (Apple): + warp: True + The Artistic (Lattice): + warp: True Yellow Backside Area: painting: True Number Hunt: @@ -3651,6 +3804,11 @@ door: Green Painting - id: blueman_painting_2 orientation: east + sunwarps: + - dots: 4 + direction: exit + entrance_indicator_pos: [ -89.01, 2.5, 4 ] + orientation: east The Undeterred: entrances: Outside The Undeterred: @@ -3928,7 +4086,10 @@ door: Eights Directional Gallery: entrances: - Outside The Agreeable: True # sunwarp + Outside The Agreeable: + room: Sunwarps + door: 6 Sunwarp + sunwarp: True Orange Tower First Floor: room: Orange Tower First Floor door: Salt Pepper Door @@ -4096,11 +4257,19 @@ orientation: south - id: cherry_painting orientation: east + sunwarps: + - dots: 6 + direction: exit + entrance_indicator_pos: [ -39, 2.5, -7.01 ] + orientation: north Color Hunt: entrances: Outside The Bold: door: Shortcut to The Steady - Orange Tower Fourth Floor: True # sunwarp + Orange Tower Fourth Floor: + room: Sunwarps + door: 5 Sunwarp + sunwarp: True Roof: True # through ceiling of sunwarp Champion's Rest: room: Outside The Initiated @@ -4159,6 +4328,11 @@ required_door: room: Outside The Initiated door: Entrance + sunwarps: + - dots: 5 + direction: exit + entrance_indicator_pos: [ 54, 2.5, 69.99 ] + orientation: north Champion's Rest: entrances: Color Hunt: @@ -4192,7 +4366,7 @@ entrances: Outside The Bold: door: Entrance - Orange Tower Fifth Floor: + Outside The Initiated: room: Art Gallery door: Exit The Bearer (East): True @@ -4640,7 +4814,8 @@ tag: midyellow The Steady (Lime): entrances: - The Steady (Sunflower): True + The Steady (Sunflower): + warp: True The Steady (Emerald): room: The Steady door: Reveal @@ -4662,7 +4837,8 @@ orientation: south The Steady (Lemon): entrances: - The Steady (Emerald): True + The Steady (Emerald): + warp: True The Steady (Orange): room: The Steady door: Reveal @@ -5019,8 +5195,10 @@ Knight Night (Outer Ring): room: Knight Night (Outer Ring) door: Fore Door + warp: True Knight Night (Right Lower Segment): door: Segment Door + warp: True panels: RUST (1): id: Appendix Room/Panel_rust_trust @@ -5049,9 +5227,11 @@ Knight Night (Right Upper Segment): room: Knight Night (Right Upper Segment) door: Segment Door + warp: True Knight Night (Outer Ring): room: Knight Night (Outer Ring) door: New Door + warp: True panels: ADJUST: id: Appendix Room/Panel_adjust_readjusted @@ -5097,9 +5277,11 @@ Knight Night (Outer Ring): room: Knight Night (Outer Ring) door: To End + warp: True Knight Night (Right Upper Segment): room: Knight Night (Outer Ring) door: To End + warp: True panels: TRUSTED: id: Appendix Room/Panel_trusted_readjusted @@ -5295,7 +5477,7 @@ entrances: Orange Tower Sixth Floor: painting: True - Outside The Agreeable: + Hallway Room (1): painting: True The Artistic (Smiley): room: The Artistic (Smiley) @@ -5746,7 +5928,8 @@ painting: True Wondrous Lobby: door: Exit - Directional Gallery: True + Directional Gallery: + warp: True panels: NEAR: id: Shuffle Room/Panel_near_near @@ -5781,7 +5964,8 @@ tag: midwhite Wondrous Lobby: entrances: - Directional Gallery: True + Directional Gallery: + warp: True The Eyes They See: room: The Eyes They See door: Exit @@ -5790,10 +5974,12 @@ orientation: east Outside The Wondrous: entrances: - Wondrous Lobby: True + Wondrous Lobby: + warp: True The Wondrous (Doorknob): door: Wondrous Entrance - The Wondrous (Window): True + The Wondrous (Window): + warp: True panels: SHRINK: id: Wonderland Room/Panel_shrink_shrink @@ -5815,7 +6001,9 @@ painting: True The Wondrous (Chandelier): painting: True - The Wondrous (Table): True # There is a way that doesn't use the painting + The Wondrous (Table): + - painting: True + - warp: True doors: Painting Shortcut: painting_id: @@ -5901,7 +6089,8 @@ required: True The Wondrous: entrances: - The Wondrous (Table): True + The Wondrous (Table): + warp: True Arrow Garden: door: Exit panels: @@ -5967,11 +6156,70 @@ paintings: - id: flower_painting_6 orientation: south - Hallway Room (2): + Hallway Room (1): entrances: Outside The Agreeable: - room: Outside The Agreeable - door: Hallway Door + warp: True + Hallway Room (2): + warp: True + Hallway Room (3): + warp: True + Hallway Room (4): + warp: True + panels: + OUT: + id: Hallway Room/Panel_out_out + check: True + exclude_reduce: True + tag: midwhite + WALL: + id: Hallway Room/Panel_castle_1 + colors: blue + tag: quad bot blue + link: qbb CASTLE + KEEP: + id: Hallway Room/Panel_castle_2 + colors: blue + tag: quad bot blue + link: qbb CASTLE + BAILEY: + id: Hallway Room/Panel_castle_3 + colors: blue + tag: quad bot blue + link: qbb CASTLE + TOWER: + id: Hallway Room/Panel_castle_4 + colors: blue + tag: quad bot blue + link: qbb CASTLE + doors: + Exit: + id: Red Blue Purple Room Area Doors/Door_room_2 + door_group: Hallway Room Doors + location_name: Hallway Room - First Room + panels: + - WALL + - KEEP + - BAILEY + - TOWER + paintings: + - id: panda_painting + orientation: south + progression: + Progressive Hallway Room: + - Exit + - room: Hallway Room (2) + door: Exit + - room: Hallway Room (3) + door: Exit + - room: Hallway Room (4) + door: Exit + Hallway Room (2): + entrances: + Hallway Room (1): + room: Hallway Room (1) + door: Exit + warp: True Elements Area: True panels: WISE: @@ -6009,6 +6257,7 @@ Hallway Room (2): room: Hallway Room (2) door: Exit + warp: True # No entrance from Elements Area. The winding hallway does not connect. panels: TRANCE: @@ -6046,6 +6295,7 @@ Hallway Room (3): room: Hallway Room (3) door: Exit + warp: True Elements Area: True panels: WHEEL: @@ -6068,6 +6318,7 @@ Hallway Room (4): room: Hallway Room (4) door: Exit + # If this door is open, then a non-warp entrance from the first hallway room is available The Artistic (Smiley): room: Hallway Room (4) door: Exit @@ -6112,6 +6363,7 @@ entrances: Orange Tower First Floor: door: Tower Entrance + warp: True Rhyme Room (Cross): room: Rhyme Room (Cross) door: Exit @@ -6139,6 +6391,7 @@ Outside The Wanderer: room: Outside The Wanderer door: Wanderer Entrance + warp: True panels: Achievement: id: Countdown Panels/Panel_1234567890_wanderlust @@ -6180,12 +6433,17 @@ tag: midorange Art Gallery: entrances: - Orange Tower Third Floor: True - Art Gallery (Second Floor): True - Art Gallery (Third Floor): True - Art Gallery (Fourth Floor): True - Orange Tower Fifth Floor: + Orange Tower Third Floor: + warp: True + Art Gallery (Second Floor): + warp: True + Art Gallery (Third Floor): + warp: True + Art Gallery (Fourth Floor): + warp: True + Outside The Initiated: door: Exit + warp: True panels: EIGHT: id: Backside Room/Panel_eight_eight_6 @@ -6766,6 +7024,7 @@ Rhyme Room (Smiley): # one-way room: Rhyme Room (Smiley) door: Door to Target + warp: True Rhyme Room (Looped Square): room: Rhyme Room (Looped Square) door: Door to Target @@ -6829,7 +7088,8 @@ # For pretty much the same reason, I don't want to shuffle the paintings in # here. entrances: - Orange Tower Fourth Floor: True + Orange Tower Fourth Floor: + warp: True panels: DOOR (1): id: Panel Room/Panel_room_door_1 @@ -7037,9 +7297,11 @@ Orange Tower Fifth Floor: room: Room Room door: Cellar Exit - Outside The Agreeable: - room: Outside The Agreeable + warp: True + Compass Room: + room: Compass Room door: Lookout Entrance + warp: True Outside The Wise: entrances: Orange Tower Sixth Floor: @@ -7077,6 +7339,7 @@ Outside The Wise: room: Outside The Wise door: Wise Entrance + warp: True # The Wise is so full of warps panels: Achievement: id: Countdown Panels/Panel_intelligent_wise diff --git a/worlds/lingo/data/generated.dat b/worlds/lingo/data/generated.dat index c957e5d51c895e444f1d5245bb9708a0a799cd14..304109ca2840005f25efda7653198ff8ddb96092 100644 GIT binary patch literal 135088 zcmd?S3!J3cRUam8S64shu`~Oa-PKC9(n{(@TC`6|3pPo0cXfBwbXPT1-P=2YWvJ<{ zo$A`2?on0Ou108sWI*hS52T<1^9tA`L{@?lgaLztfY>n@fdCN+27G>9zKigHcl2dvI^>Ef4PPKK7PJ9%{ekt(Q8xyAM75*zVq?_EQh+KKNi~ zluYmM4HWcl=ixU$@W5k_J^a=O9^HG(ZoBj52OfU#k=;k$^1$AM554t)w~mI%%x1Y- z->TMEMO&xZ{r=IjgNs+&`-jK-hnGjm%wGGreSGa|XMnml)$0$A7P>RZiPmwuPhh3y z(b1LB3(vpsLj8poUN|1TXOx`wYISw9$Si$a1qnz0~R+^^bRl z$D{WGO@-~vPaRN|riHgMBCnE_pG#(zj)wi?Yrtb{U3U$xUAfXZ?q4&twJ#2cQk_26 z`Z`_f?OWYWY3Jy0uYWWglokl{rw@-V-8Z(4(^or(yZZ;ag*S7>_v?yJH-^W9{k=|! z8dy9!7?1UtO9#Wwm9|A>F&2;LI&ZV<+&wf6=L+&$NAB-52^ z829$U0W+bV3|^CuFoxURhSSK*vz@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%4!vfNU%Ox2^x%PX8K*iVIPtmhIq1lJd;-h1Gd2=yX-I?%KC>Rx6)^%d?{40+Bj#1l*O*rNX z#77nj1@S3Gm9;0#=rIu-?hzovX1|s(2>?YfdmPI;@_a_5KegQgu!M diff --git a/worlds/lingo/data/ids.yaml b/worlds/lingo/data/ids.yaml index d3307deaa300..918af7aba923 100644 --- a/worlds/lingo/data/ids.yaml +++ b/worlds/lingo/data/ids.yaml @@ -140,13 +140,9 @@ panels: PURPLE: 444502 FIVE (1): 444503 FIVE (2): 444504 - OUT: 444505 HIDE: 444506 DAZE: 444507 - WALL: 444508 - KEEP: 444509 - BAILEY: 444510 - TOWER: 444511 + Compass Room: NORTH: 444512 DIAMONDS: 444513 FIRE: 444514 @@ -689,6 +685,12 @@ panels: Arrow Garden: MASTERY: 444948 SHARP: 444949 + Hallway Room (1): + OUT: 444505 + WALL: 444508 + KEEP: 444509 + BAILEY: 444510 + TOWER: 444511 Hallway Room (2): WISE: 444950 CLOCK: 444951 @@ -995,6 +997,19 @@ doors: Traveled Entrance: item: 444433 location: 444438 + Sunwarps: + 1 Sunwarp: + item: 444581 + 2 Sunwarp: + item: 444588 + 3 Sunwarp: + item: 444586 + 4 Sunwarp: + item: 444585 + 5 Sunwarp: + item: 444587 + 6 Sunwarp: + item: 444584 Pilgrim Antechamber: Sun Painting: item: 444436 @@ -1067,9 +1082,7 @@ doors: location: 444501 Purple Barrier: item: 444457 - Hallway Door: - item: 444459 - location: 445214 + Compass Room: Lookout Entrance: item: 444579 location: 445271 @@ -1342,6 +1355,10 @@ doors: Exit: item: 444552 location: 444947 + Hallway Room (1): + Exit: + item: 444459 + location: 445214 Hallway Room (2): Exit: item: 444553 @@ -1452,9 +1469,11 @@ door_groups: Colorful Doors: 444498 Directional Gallery Doors: 444531 Artistic Doors: 444545 + Sunwarps: 444582 progression: Progressive Hallway Room: 444461 Progressive Fearless: 444470 Progressive Orange Tower: 444482 Progressive Art Gallery: 444563 Progressive Colorful: 444580 + Progressive Pilgrimage: 444583 diff --git a/worlds/lingo/datatypes.py b/worlds/lingo/datatypes.py index e9bf0a378039..e466558f87ff 100644 --- a/worlds/lingo/datatypes.py +++ b/worlds/lingo/datatypes.py @@ -1,3 +1,4 @@ +from enum import Enum, Flag, auto from typing import List, NamedTuple, Optional @@ -11,10 +12,18 @@ class RoomAndPanel(NamedTuple): panel: str +class EntranceType(Flag): + NORMAL = auto() + PAINTING = auto() + SUNWARP = auto() + WARP = auto() + CROSSROADS_ROOF_ACCESS = auto() + + class RoomEntrance(NamedTuple): room: str # source room door: Optional[RoomAndDoor] - painting: bool + type: EntranceType class Room(NamedTuple): @@ -22,6 +31,12 @@ class Room(NamedTuple): entrances: List[RoomEntrance] +class DoorType(Enum): + NORMAL = 1 + SUNWARP = 2 + SUN_PAINTING = 3 + + class Door(NamedTuple): name: str item_name: str @@ -34,7 +49,7 @@ class Door(NamedTuple): event: bool door_group: Optional[str] include_reduce: bool - junk_item: bool + type: DoorType item_group: Optional[str] diff --git a/worlds/lingo/items.py b/worlds/lingo/items.py index 7c7928cbab68..67eaceab10fe 100644 --- a/worlds/lingo/items.py +++ b/worlds/lingo/items.py @@ -1,8 +1,14 @@ -from typing import Dict, List, NamedTuple, Optional, TYPE_CHECKING +from enum import Enum +from typing import Dict, List, NamedTuple, Set from BaseClasses import Item, ItemClassification -from .static_logic import DOORS_BY_ROOM, PROGRESSION_BY_ROOM, PROGRESSIVE_ITEMS, get_door_group_item_id, \ - get_door_item_id, get_progressive_item_id, get_special_item_id +from .static_logic import DOORS_BY_ROOM, PROGRESSIVE_ITEMS, get_door_group_item_id, get_door_item_id, \ + get_progressive_item_id, get_special_item_id + + +class ItemType(Enum): + NORMAL = 1 + COLOR = 2 class ItemData(NamedTuple): @@ -11,7 +17,7 @@ class ItemData(NamedTuple): """ code: int classification: ItemClassification - mode: Optional[str] + type: ItemType has_doors: bool painting_ids: List[str] @@ -34,36 +40,29 @@ def load_item_data(): for color in ["Black", "Red", "Blue", "Yellow", "Green", "Orange", "Gray", "Brown", "Purple"]: ALL_ITEM_TABLE[color] = ItemData(get_special_item_id(color), ItemClassification.progression, - "colors", [], []) + ItemType.COLOR, False, []) ITEMS_BY_GROUP.setdefault("Colors", []).append(color) - door_groups: Dict[str, List[str]] = {} + door_groups: Set[str] = set() for room_name, doors in DOORS_BY_ROOM.items(): for door_name, door in doors.items(): if door.skip_item is True or door.event is True: continue - if door.door_group is None: - door_mode = "doors" - else: - door_mode = "complex door" - door_groups.setdefault(door.door_group, []) - - if room_name in PROGRESSION_BY_ROOM and door_name in PROGRESSION_BY_ROOM[room_name]: - door_mode = "special" + if door.door_group is not None: + door_groups.add(door.door_group) ALL_ITEM_TABLE[door.item_name] = \ - ItemData(get_door_item_id(room_name, door_name), - ItemClassification.filler if door.junk_item else ItemClassification.progression, door_mode, + ItemData(get_door_item_id(room_name, door_name), ItemClassification.progression, ItemType.NORMAL, door.has_doors, door.painting_ids) ITEMS_BY_GROUP.setdefault("Doors", []).append(door.item_name) if door.item_group is not None: ITEMS_BY_GROUP.setdefault(door.item_group, []).append(door.item_name) - for group, group_door_ids in door_groups.items(): + for group in door_groups: ALL_ITEM_TABLE[group] = ItemData(get_door_group_item_id(group), - ItemClassification.progression, "door group", True, []) + ItemClassification.progression, ItemType.NORMAL, True, []) ITEMS_BY_GROUP.setdefault("Doors", []).append(group) special_items: Dict[str, ItemClassification] = { @@ -77,7 +76,7 @@ def load_item_data(): for item_name, classification in special_items.items(): ALL_ITEM_TABLE[item_name] = ItemData(get_special_item_id(item_name), classification, - "special", False, []) + ItemType.NORMAL, False, []) if classification == ItemClassification.filler: ITEMS_BY_GROUP.setdefault("Junk", []).append(item_name) @@ -86,7 +85,7 @@ def load_item_data(): for item_name in PROGRESSIVE_ITEMS: ALL_ITEM_TABLE[item_name] = ItemData(get_progressive_item_id(item_name), - ItemClassification.progression, "special", False, []) + ItemClassification.progression, ItemType.NORMAL, False, []) # Initialize the item data at module scope. diff --git a/worlds/lingo/locations.py b/worlds/lingo/locations.py index 92ee309487a5..a6e53e761d49 100644 --- a/worlds/lingo/locations.py +++ b/worlds/lingo/locations.py @@ -56,7 +56,7 @@ def load_location_data(): for room_name, doors in DOORS_BY_ROOM.items(): for door_name, door in doors.items(): - if door.skip_location or door.event or door.panels is None: + if door.skip_location or door.event or not door.panels: continue location_name = door.location_name diff --git a/worlds/lingo/options.py b/worlds/lingo/options.py index 293992ab91d6..05fb4ed977e0 100644 --- a/worlds/lingo/options.py +++ b/worlds/lingo/options.py @@ -61,15 +61,55 @@ class ShufflePaintings(Toggle): display_name = "Shuffle Paintings" +class EnablePilgrimage(Toggle): + """If on, you are required to complete a pilgrimage in order to access the Pilgrim Antechamber. + If off, the pilgrimage will be deactivated, and the sun painting will be added to the pool, even if door shuffle is off.""" + display_name = "Enable Pilgrimage" + + +class PilgrimageAllowsRoofAccess(DefaultOnToggle): + """If on, you may use the Crossroads roof access during a pilgrimage (and you may be expected to do so). + Otherwise, pilgrimage will be deactivated when going up the stairs.""" + display_name = "Allow Roof Access for Pilgrimage" + + +class PilgrimageAllowsPaintings(DefaultOnToggle): + """If on, you may use paintings during a pilgrimage (and you may be expected to do so). + Otherwise, pilgrimage will be deactivated when going through a painting.""" + display_name = "Allow Paintings for Pilgrimage" + + +class SunwarpAccess(Choice): + """Determines how access to sunwarps works. + On "normal", all sunwarps are enabled from the start. + On "disabled", all sunwarps are disabled. Pilgrimage must be disabled when this is used. + On "unlock", sunwarps start off disabled, and all six activate once you receive an item. + On "individual", sunwarps start off disabled, and each has a corresponding item that unlocks it. + On "progressive", sunwarps start off disabled, and they unlock in order using a progressive item.""" + display_name = "Sunwarp Access" + option_normal = 0 + option_disabled = 1 + option_unlock = 2 + option_individual = 3 + option_progressive = 4 + + +class ShuffleSunwarps(Toggle): + """If on, the pairing and ordering of the sunwarps in the game will be randomized.""" + display_name = "Shuffle Sunwarps" + + class VictoryCondition(Choice): """Change the victory condition. On "the_end", the goal is to solve THE END at the top of the tower. On "the_master", the goal is to solve THE MASTER at the top of the tower, after getting the number of achievements specified in the Mastery Achievements option. - On "level_2", the goal is to solve LEVEL 2 in the second room, after solving the number of panels specified in the Level 2 Requirement option.""" + On "level_2", the goal is to solve LEVEL 2 in the second room, after solving the number of panels specified in the Level 2 Requirement option. + On "pilgrimage", the goal is to solve PILGRIM in the Pilgrim Antechamber, typically after performing a Pilgrimage.""" display_name = "Victory Condition" option_the_end = 0 option_the_master = 1 option_level_2 = 2 + option_pilgrimage = 3 class MasteryAchievements(Range): @@ -140,6 +180,11 @@ class LingoOptions(PerGameCommonOptions): shuffle_colors: ShuffleColors shuffle_panels: ShufflePanels shuffle_paintings: ShufflePaintings + enable_pilgrimage: EnablePilgrimage + pilgrimage_allows_roof_access: PilgrimageAllowsRoofAccess + pilgrimage_allows_paintings: PilgrimageAllowsPaintings + sunwarp_access: SunwarpAccess + shuffle_sunwarps: ShuffleSunwarps victory_condition: VictoryCondition mastery_achievements: MasteryAchievements level_2_requirement: Level2Requirement diff --git a/worlds/lingo/player_logic.py b/worlds/lingo/player_logic.py index 966f5a163762..96e9869d3731 100644 --- a/worlds/lingo/player_logic.py +++ b/worlds/lingo/player_logic.py @@ -1,12 +1,13 @@ from enum import Enum from typing import Dict, List, NamedTuple, Optional, Set, Tuple, TYPE_CHECKING -from .datatypes import Door, RoomAndDoor, RoomAndPanel -from .items import ALL_ITEM_TABLE, ItemData +from .datatypes import Door, DoorType, RoomAndDoor, RoomAndPanel +from .items import ALL_ITEM_TABLE, ItemType from .locations import ALL_LOCATION_TABLE, LocationClassification -from .options import LocationChecks, ShuffleDoors, VictoryCondition +from .options import LocationChecks, ShuffleDoors, SunwarpAccess, VictoryCondition from .static_logic import DOORS_BY_ROOM, PAINTINGS, PAINTING_ENTRANCES, PAINTING_EXITS, \ - PANELS_BY_ROOM, PROGRESSION_BY_ROOM, REQUIRED_PAINTING_ROOMS, REQUIRED_PAINTING_WHEN_NO_DOORS_ROOMS + PANELS_BY_ROOM, PROGRESSION_BY_ROOM, REQUIRED_PAINTING_ROOMS, REQUIRED_PAINTING_WHEN_NO_DOORS_ROOMS, \ + SUNWARP_ENTRANCES, SUNWARP_EXITS if TYPE_CHECKING: from . import LingoWorld @@ -58,21 +59,6 @@ def should_split_progression(progression_name: str, world: "LingoWorld") -> Prog return ProgressiveItemBehavior.PROGRESSIVE -def should_include_item(item: ItemData, world: "LingoWorld") -> bool: - if item.mode == "colors": - return world.options.shuffle_colors > 0 - elif item.mode == "doors": - return world.options.shuffle_doors != ShuffleDoors.option_none - elif item.mode == "complex door": - return world.options.shuffle_doors == ShuffleDoors.option_complex - elif item.mode == "door group": - return world.options.shuffle_doors == ShuffleDoors.option_simple - elif item.mode == "special": - return False - else: - return True - - class LingoPlayerLogic: """ Defines logic after a player's options have been applied @@ -99,6 +85,10 @@ class LingoPlayerLogic: mastery_reqs: List[AccessRequirements] counting_panel_reqs: Dict[str, List[Tuple[AccessRequirements, int]]] + sunwarp_mapping: List[int] + sunwarp_entrances: List[str] + sunwarp_exits: List[str] + def add_location(self, room: str, name: str, code: Optional[int], panels: List[RoomAndPanel], world: "LingoWorld"): """ Creates a location. This function determines the access requirements for the location by combining and @@ -132,6 +122,7 @@ def handle_non_grouped_door(self, room_name: str, door_data: Door, world: "Lingo self.real_items.append(progressive_item_name) else: self.set_door_item(room_name, door_data.name, door_data.item_name) + self.real_items.append(door_data.item_name) def __init__(self, world: "LingoWorld"): self.item_by_door = {} @@ -148,6 +139,7 @@ def __init__(self, world: "LingoWorld"): self.door_reqs = {} self.mastery_reqs = [] self.counting_panel_reqs = {} + self.sunwarp_mapping = [] door_shuffle = world.options.shuffle_doors color_shuffle = world.options.shuffle_colors @@ -161,15 +153,37 @@ def __init__(self, world: "LingoWorld"): "be enough locations for all of the door items.") # Create door items, where needed. - if door_shuffle != ShuffleDoors.option_none: - for room_name, room_data in DOORS_BY_ROOM.items(): - for door_name, door_data in room_data.items(): - if door_data.skip_item is False and door_data.event is False: + door_groups: Set[str] = set() + for room_name, room_data in DOORS_BY_ROOM.items(): + for door_name, door_data in room_data.items(): + if door_data.skip_item is False and door_data.event is False: + if door_data.type == DoorType.NORMAL and door_shuffle != ShuffleDoors.option_none: if door_data.door_group is not None and door_shuffle == ShuffleDoors.option_simple: # Grouped doors are handled differently if shuffle doors is on simple. self.set_door_item(room_name, door_name, door_data.door_group) + door_groups.add(door_data.door_group) else: self.handle_non_grouped_door(room_name, door_data, world) + elif door_data.type == DoorType.SUNWARP: + if world.options.sunwarp_access == SunwarpAccess.option_unlock: + self.set_door_item(room_name, door_name, "Sunwarps") + door_groups.add("Sunwarps") + elif world.options.sunwarp_access == SunwarpAccess.option_individual: + self.set_door_item(room_name, door_name, door_data.item_name) + self.real_items.append(door_data.item_name) + elif world.options.sunwarp_access == SunwarpAccess.option_progressive: + self.set_door_item(room_name, door_name, "Progressive Pilgrimage") + self.real_items.append("Progressive Pilgrimage") + elif door_data.type == DoorType.SUN_PAINTING: + if not world.options.enable_pilgrimage: + self.set_door_item(room_name, door_name, door_data.item_name) + self.real_items.append(door_data.item_name) + + self.real_items += door_groups + + # Create color items, if needed. + if color_shuffle: + self.real_items += [name for name, item in ALL_ITEM_TABLE.items() if item.type == ItemType.COLOR] # Create events for each achievement panel, so that we can determine when THE MASTER is accessible. for room_name, room_data in PANELS_BY_ROOM.items(): @@ -206,6 +220,11 @@ def __init__(self, world: "LingoWorld"): if world.options.level_2_requirement == 1: raise Exception("The Level 2 requirement must be at least 2 when LEVEL 2 is the victory condition.") + elif victory_condition == VictoryCondition.option_pilgrimage: + self.victory_condition = "Pilgrim Antechamber - PILGRIM" + self.add_location("Pilgrim Antechamber", "PILGRIM (Solved)", None, + [RoomAndPanel("Pilgrim Antechamber", "PILGRIM")], world) + self.event_loc_to_item["PILGRIM (Solved)"] = "Victory" # Create groups of counting panel access requirements for the LEVEL 2 check. self.create_panel_hunt_events(world) @@ -225,28 +244,22 @@ def __init__(self, world: "LingoWorld"): self.add_location(location_data.room, location_name, location_data.code, location_data.panels, world) self.real_locations.append(location_name) - # Instantiate all real items. - for name, item in ALL_ITEM_TABLE.items(): - if should_include_item(item, world): - self.real_items.append(name) - - # Calculate the requirements for the fake pilgrimage. - fake_pilgrimage = [ - ["Second Room", "Exit Door"], ["Crossroads", "Tower Entrance"], - ["Orange Tower Fourth Floor", "Hot Crusts Door"], ["Outside The Initiated", "Shortcut to Hub Room"], - ["Orange Tower First Floor", "Shortcut to Hub Room"], ["Directional Gallery", "Shortcut to The Undeterred"], - ["Orange Tower First Floor", "Salt Pepper Door"], ["Hub Room", "Crossroads Entrance"], - ["Color Hunt", "Shortcut to The Steady"], ["The Bearer", "Entrance"], ["Art Gallery", "Exit"], - ["The Tenacious", "Shortcut to Hub Room"], ["Outside The Agreeable", "Tenacious Entrance"] - ] - pilgrimage_reqs = AccessRequirements() - for door in fake_pilgrimage: - door_object = DOORS_BY_ROOM[door[0]][door[1]] - if door_object.event or world.options.shuffle_doors == ShuffleDoors.option_none: - pilgrimage_reqs.merge(self.calculate_door_requirements(door[0], door[1], world)) - else: - pilgrimage_reqs.doors.add(RoomAndDoor(door[0], door[1])) - self.door_reqs.setdefault("Pilgrim Antechamber", {})["Pilgrimage"] = pilgrimage_reqs + if world.options.enable_pilgrimage and world.options.sunwarp_access == SunwarpAccess.option_disabled: + raise Exception("Sunwarps cannot be disabled when pilgrimage is enabled.") + + if world.options.shuffle_sunwarps: + if world.options.sunwarp_access == SunwarpAccess.option_disabled: + raise Exception("Sunwarps cannot be shuffled if they are disabled.") + + self.sunwarp_mapping = list(range(0, 12)) + world.random.shuffle(self.sunwarp_mapping) + + sunwarp_rooms = SUNWARP_ENTRANCES + SUNWARP_EXITS + self.sunwarp_entrances = [sunwarp_rooms[i] for i in self.sunwarp_mapping[0:6]] + self.sunwarp_exits = [sunwarp_rooms[i] for i in self.sunwarp_mapping[6:12]] + else: + self.sunwarp_entrances = SUNWARP_ENTRANCES + self.sunwarp_exits = SUNWARP_EXITS # Create the paintings mapping, if painting shuffle is on. if painting_shuffle: @@ -277,10 +290,11 @@ def __init__(self, world: "LingoWorld"): # Starting Room - Exit Door gives access to OPEN and TRACE. good_item_options: List[str] = ["Starting Room - Back Right Door", "Second Room - Exit Door"] - if not color_shuffle: + if not color_shuffle and not world.options.enable_pilgrimage: # HOT CRUST and THIS. good_item_options.append("Pilgrim Room - Sun Painting") + if not color_shuffle: if door_shuffle == ShuffleDoors.option_simple: # WELCOME BACK, CLOCKWISE, and DRAWL + RUNS. good_item_options.append("Welcome Back Doors") diff --git a/worlds/lingo/regions.py b/worlds/lingo/regions.py index 5fddabd6894e..4b357db261b4 100644 --- a/worlds/lingo/regions.py +++ b/worlds/lingo/regions.py @@ -1,10 +1,11 @@ from typing import Dict, Optional, TYPE_CHECKING from BaseClasses import Entrance, ItemClassification, Region -from .datatypes import Room, RoomAndDoor +from .datatypes import EntranceType, Room, RoomAndDoor from .items import LingoItem from .locations import LingoLocation -from .rules import lingo_can_use_entrance, make_location_lambda +from .options import SunwarpAccess +from .rules import lingo_can_do_pilgrimage, lingo_can_use_entrance, make_location_lambda from .static_logic import ALL_ROOMS, PAINTINGS if TYPE_CHECKING: @@ -25,8 +26,20 @@ def create_region(room: Room, world: "LingoWorld") -> Region: return new_region +def is_acceptable_pilgrimage_entrance(entrance_type: EntranceType, world: "LingoWorld") -> bool: + allowed_entrance_types = EntranceType.NORMAL + + if world.options.pilgrimage_allows_paintings: + allowed_entrance_types |= EntranceType.PAINTING + + if world.options.pilgrimage_allows_roof_access: + allowed_entrance_types |= EntranceType.CROSSROADS_ROOF_ACCESS + + return bool(entrance_type & allowed_entrance_types) + + def connect_entrance(regions: Dict[str, Region], source_region: Region, target_region: Region, description: str, - door: Optional[RoomAndDoor], world: "LingoWorld"): + door: Optional[RoomAndDoor], entrance_type: EntranceType, pilgrimage: bool, world: "LingoWorld"): connection = Entrance(world.player, description, source_region) connection.access_rule = lambda state: lingo_can_use_entrance(state, target_region.name, door, world) @@ -38,6 +51,21 @@ def connect_entrance(regions: Dict[str, Region], source_region: Region, target_r if door.door not in world.player_logic.item_by_door.get(effective_room, {}): for region in world.player_logic.calculate_door_requirements(effective_room, door.door, world).rooms: world.multiworld.register_indirect_condition(regions[region], connection) + + if not pilgrimage and world.options.enable_pilgrimage and is_acceptable_pilgrimage_entrance(entrance_type, world)\ + and source_region.name != "Menu": + for part in range(1, 6): + pilgrimage_descriptor = f" (Pilgrimage Part {part})" + pilgrim_source_region = regions[f"{source_region.name}{pilgrimage_descriptor}"] + pilgrim_target_region = regions[f"{target_region.name}{pilgrimage_descriptor}"] + + effective_door = door + if effective_door is not None: + effective_room = target_region.name if door.room is None else door.room + effective_door = RoomAndDoor(effective_room, door.door) + + connect_entrance(regions, pilgrim_source_region, pilgrim_target_region, + f"{description}{pilgrimage_descriptor}", effective_door, entrance_type, True, world) def connect_painting(regions: Dict[str, Region], warp_enter: str, warp_exit: str, world: "LingoWorld") -> None: @@ -48,7 +76,8 @@ def connect_painting(regions: Dict[str, Region], warp_enter: str, warp_exit: str source_region = regions[source_painting.room] entrance_name = f"{source_painting.room} to {target_painting.room} ({source_painting.id} Painting)" - connect_entrance(regions, source_region, target_region, entrance_name, source_painting.required_door, world) + connect_entrance(regions, source_region, target_region, entrance_name, source_painting.required_door, + EntranceType.PAINTING, False, world) def create_regions(world: "LingoWorld") -> None: @@ -63,11 +92,26 @@ def create_regions(world: "LingoWorld") -> None: for room in ALL_ROOMS: regions[room.name] = create_region(room, world) + if world.options.enable_pilgrimage: + for part in range(1, 6): + pilgrimage_region_name = f"{room.name} (Pilgrimage Part {part})" + regions[pilgrimage_region_name] = Region(pilgrimage_region_name, world.player, world.multiworld) + # Connect all created regions now that they exist. + allowed_entrance_types = EntranceType.NORMAL | EntranceType.WARP | EntranceType.CROSSROADS_ROOF_ACCESS + + if not painting_shuffle: + # Don't use the vanilla painting connections if we are shuffling paintings. + allowed_entrance_types |= EntranceType.PAINTING + + if world.options.sunwarp_access != SunwarpAccess.option_disabled and not world.options.shuffle_sunwarps: + # Don't connect sunwarps if sunwarps are disabled or if we're shuffling sunwarps. + allowed_entrance_types |= EntranceType.SUNWARP + for room in ALL_ROOMS: for entrance in room.entrances: - # Don't use the vanilla painting connections if we are shuffling paintings. - if entrance.painting and painting_shuffle: + effective_entrance_type = entrance.type & allowed_entrance_types + if not effective_entrance_type: continue entrance_name = f"{entrance.room} to {room.name}" @@ -77,17 +121,56 @@ def create_regions(world: "LingoWorld") -> None: else: entrance_name += f" (through {room.name} - {entrance.door.door})" - connect_entrance(regions, regions[entrance.room], regions[room.name], entrance_name, entrance.door, world) + effective_door = entrance.door + if entrance.type == EntranceType.SUNWARP and world.options.sunwarp_access == SunwarpAccess.option_normal: + effective_door = None + + connect_entrance(regions, regions[entrance.room], regions[room.name], entrance_name, effective_door, + effective_entrance_type, False, world) + + if world.options.enable_pilgrimage: + # Connect the start of the pilgrimage. We check for all sunwarp items here. + pilgrim_start_from = regions[world.player_logic.sunwarp_entrances[0]] + pilgrim_start_to = regions[f"{world.player_logic.sunwarp_exits[0]} (Pilgrimage Part 1)"] + + if world.options.sunwarp_access >= SunwarpAccess.option_unlock: + pilgrim_start_from.connect(pilgrim_start_to, f"Pilgrimage Part 1", + lambda state: lingo_can_do_pilgrimage(state, world)) + else: + pilgrim_start_from.connect(pilgrim_start_to, f"Pilgrimage Part 1") - # Add the fake pilgrimage. - connect_entrance(regions, regions["Outside The Agreeable"], regions["Pilgrim Antechamber"], "Pilgrimage", - RoomAndDoor("Pilgrim Antechamber", "Pilgrimage"), world) + # Create connections between each segment of the pilgrimage. + for i in range(1, 6): + from_room = f"{world.player_logic.sunwarp_entrances[i]} (Pilgrimage Part {i})" + to_room = f"{world.player_logic.sunwarp_exits[i]} (Pilgrimage Part {i+1})" + if i == 5: + to_room = "Pilgrim Antechamber" + + regions[from_room].connect(regions[to_room], f"Pilgrimage Part {i+1}") + else: + connect_entrance(regions, regions["Starting Room"], regions["Pilgrim Antechamber"], "Sun Painting", + RoomAndDoor("Pilgrim Antechamber", "Sun Painting"), EntranceType.PAINTING, False, world) if early_color_hallways: - regions["Starting Room"].connect(regions["Outside The Undeterred"], "Early Color Hallways") + connect_entrance(regions, regions["Starting Room"], regions["Outside The Undeterred"], "Early Color Hallways", + None, EntranceType.PAINTING, False, world) if painting_shuffle: for warp_enter, warp_exit in world.player_logic.painting_mapping.items(): connect_painting(regions, warp_enter, warp_exit, world) + if world.options.shuffle_sunwarps: + for i in range(0, 6): + if world.options.sunwarp_access == SunwarpAccess.option_normal: + effective_door = None + else: + effective_door = RoomAndDoor("Sunwarps", f"{i + 1} Sunwarp") + + source_region = regions[world.player_logic.sunwarp_entrances[i]] + target_region = regions[world.player_logic.sunwarp_exits[i]] + + entrance_name = f"{source_region.name} to {target_region.name} ({i + 1} Sunwarp)" + connect_entrance(regions, source_region, target_region, entrance_name, effective_door, EntranceType.SUNWARP, + False, world) + world.multiworld.regions += regions.values() diff --git a/worlds/lingo/rules.py b/worlds/lingo/rules.py index 4e12938afa26..9cc11fdaea31 100644 --- a/worlds/lingo/rules.py +++ b/worlds/lingo/rules.py @@ -17,6 +17,10 @@ def lingo_can_use_entrance(state: CollectionState, room: str, door: RoomAndDoor, return _lingo_can_open_door(state, effective_room, door.door, world) +def lingo_can_do_pilgrimage(state: CollectionState, world: "LingoWorld"): + return all(_lingo_can_open_door(state, "Sunwarps", f"{i} Sunwarp", world) for i in range(1, 7)) + + def lingo_can_use_location(state: CollectionState, location: PlayerLocation, world: "LingoWorld"): return _lingo_can_satisfy_requirements(state, location.access, world) diff --git a/worlds/lingo/static_logic.py b/worlds/lingo/static_logic.py index 1da265df7d70..c7ee00102ca5 100644 --- a/worlds/lingo/static_logic.py +++ b/worlds/lingo/static_logic.py @@ -1,10 +1,9 @@ import os import pkgutil +import pickle from io import BytesIO from typing import Dict, List, Set -import pickle - from .datatypes import Door, Painting, Panel, Progression, Room ALL_ROOMS: List[Room] = [] @@ -21,6 +20,9 @@ REQUIRED_PAINTING_ROOMS: List[str] = [] REQUIRED_PAINTING_WHEN_NO_DOORS_ROOMS: List[str] = [] +SUNWARP_ENTRANCES: List[str] = [] +SUNWARP_EXITS: List[str] = [] + SPECIAL_ITEM_IDS: Dict[str, int] = {} PANEL_LOCATION_IDS: Dict[str, Dict[str, int]] = {} DOOR_LOCATION_IDS: Dict[str, Dict[str, int]] = {} @@ -99,6 +101,8 @@ def find_class(self, module, name): PAINTING_EXITS = pickdata["PAINTING_EXITS"] REQUIRED_PAINTING_ROOMS.extend(pickdata["REQUIRED_PAINTING_ROOMS"]) REQUIRED_PAINTING_WHEN_NO_DOORS_ROOMS.extend(pickdata["REQUIRED_PAINTING_WHEN_NO_DOORS_ROOMS"]) + SUNWARP_ENTRANCES.extend(pickdata["SUNWARP_ENTRANCES"]) + SUNWARP_EXITS.extend(pickdata["SUNWARP_EXITS"]) SPECIAL_ITEM_IDS.update(pickdata["SPECIAL_ITEM_IDS"]) PANEL_LOCATION_IDS.update(pickdata["PANEL_LOCATION_IDS"]) DOOR_LOCATION_IDS.update(pickdata["DOOR_LOCATION_IDS"]) diff --git a/worlds/lingo/test/TestOptions.py b/worlds/lingo/test/TestOptions.py index 176967786243..fce074311637 100644 --- a/worlds/lingo/test/TestOptions.py +++ b/worlds/lingo/test/TestOptions.py @@ -29,3 +29,23 @@ class TestAllPanelHunt(LingoTestBase): "level_2_requirement": "800", "early_color_hallways": "true" } + + +class TestShuffleSunwarps(LingoTestBase): + options = { + "shuffle_doors": "none", + "shuffle_colors": "false", + "victory_condition": "pilgrimage", + "shuffle_sunwarps": "true", + "sunwarp_access": "normal" + } + + +class TestShuffleSunwarpsAccess(LingoTestBase): + options = { + "shuffle_doors": "none", + "shuffle_colors": "false", + "victory_condition": "pilgrimage", + "shuffle_sunwarps": "true", + "sunwarp_access": "individual" + } \ No newline at end of file diff --git a/worlds/lingo/test/TestPilgrimage.py b/worlds/lingo/test/TestPilgrimage.py new file mode 100644 index 000000000000..3cc91940017e --- /dev/null +++ b/worlds/lingo/test/TestPilgrimage.py @@ -0,0 +1,114 @@ +from . import LingoTestBase + + +class TestDisabledPilgrimage(LingoTestBase): + options = { + "enable_pilgrimage": "false", + "shuffle_colors": "false" + } + + def test_access(self): + self.assertFalse(self.can_reach_location("Pilgrim Antechamber - PILGRIM")) + + self.collect_by_name("Pilgrim Room - Sun Painting") + self.assertTrue(self.can_reach_location("Pilgrim Antechamber - PILGRIM")) + + +class TestPilgrimageWithRoofAndPaintings(LingoTestBase): + options = { + "enable_pilgrimage": "true", + "shuffle_colors": "false", + "shuffle_doors": "complex", + "pilgrimage_allows_roof_access": "true", + "pilgrimage_allows_paintings": "true", + "early_color_hallways": "false" + } + + def test_access(self): + doors = ["Second Room - Exit Door", "Crossroads - Roof Access", "Hub Room - Crossroads Entrance", + "Outside The Undeterred - Green Painting"] + + for door in doors: + print(door) + self.assertFalse(self.can_reach_location("Pilgrim Antechamber - PILGRIM")) + self.collect_by_name(door) + + self.assertTrue(self.can_reach_location("Pilgrim Antechamber - PILGRIM")) + + +class TestPilgrimageNoRoofYesPaintings(LingoTestBase): + options = { + "enable_pilgrimage": "true", + "shuffle_colors": "false", + "shuffle_doors": "complex", + "pilgrimage_allows_roof_access": "false", + "pilgrimage_allows_paintings": "true", + "early_color_hallways": "false" + } + + def test_access(self): + doors = ["Second Room - Exit Door", "Crossroads - Roof Access", "Hub Room - Crossroads Entrance", + "Outside The Undeterred - Green Painting", "Crossroads - Tower Entrance", + "Orange Tower Fourth Floor - Hot Crusts Door", "Orange Tower First Floor - Shortcut to Hub Room", + "Starting Room - Street Painting"] + + for door in doors: + print(door) + self.assertFalse(self.can_reach_location("Pilgrim Antechamber - PILGRIM")) + self.collect_by_name(door) + + self.assertTrue(self.can_reach_location("Pilgrim Antechamber - PILGRIM")) + + +class TestPilgrimageNoRoofNoPaintings(LingoTestBase): + options = { + "enable_pilgrimage": "true", + "shuffle_colors": "false", + "shuffle_doors": "complex", + "pilgrimage_allows_roof_access": "false", + "pilgrimage_allows_paintings": "false", + "early_color_hallways": "false" + } + + def test_access(self): + doors = ["Second Room - Exit Door", "Crossroads - Roof Access", "Hub Room - Crossroads Entrance", + "Outside The Undeterred - Green Painting", "Orange Tower First Floor - Shortcut to Hub Room", + "Starting Room - Street Painting", "Outside The Initiated - Shortcut to Hub Room", + "Directional Gallery - Shortcut to The Undeterred", "Orange Tower First Floor - Salt Pepper Door", + "Color Hunt - Shortcut to The Steady", "The Bearer - Entrance", + "Orange Tower Fifth Floor - Quadruple Intersection", "The Tenacious - Shortcut to Hub Room", + "Outside The Agreeable - Tenacious Entrance", "Crossroads - Tower Entrance", + "Orange Tower Fourth Floor - Hot Crusts Door"] + + for door in doors: + print(door) + self.assertFalse(self.can_reach_location("Pilgrim Antechamber - PILGRIM")) + self.collect_by_name(door) + + self.assertTrue(self.can_reach_location("Pilgrim Antechamber - PILGRIM")) + + +class TestPilgrimageYesRoofNoPaintings(LingoTestBase): + options = { + "enable_pilgrimage": "true", + "shuffle_colors": "false", + "shuffle_doors": "complex", + "pilgrimage_allows_roof_access": "true", + "pilgrimage_allows_paintings": "false", + "early_color_hallways": "false" + } + + def test_access(self): + doors = ["Second Room - Exit Door", "Crossroads - Roof Access", "Hub Room - Crossroads Entrance", + "Outside The Undeterred - Green Painting", "Orange Tower First Floor - Shortcut to Hub Room", + "Starting Room - Street Painting", "Outside The Initiated - Shortcut to Hub Room", + "Directional Gallery - Shortcut to The Undeterred", "Orange Tower First Floor - Salt Pepper Door", + "Color Hunt - Shortcut to The Steady", "The Bearer - Entrance", + "Orange Tower Fifth Floor - Quadruple Intersection"] + + for door in doors: + print(door) + self.assertFalse(self.can_reach_location("Pilgrim Antechamber - PILGRIM")) + self.collect_by_name(door) + + self.assertTrue(self.can_reach_location("Pilgrim Antechamber - PILGRIM")) diff --git a/worlds/lingo/test/TestSunwarps.py b/worlds/lingo/test/TestSunwarps.py new file mode 100644 index 000000000000..e8e913c4f499 --- /dev/null +++ b/worlds/lingo/test/TestSunwarps.py @@ -0,0 +1,213 @@ +from . import LingoTestBase + + +class TestVanillaDoorsNormalSunwarps(LingoTestBase): + options = { + "shuffle_doors": "none", + "shuffle_colors": "true", + "sunwarp_access": "normal" + } + + def test_access(self): + self.assertTrue(self.multiworld.state.can_reach("Crossroads", "Region", self.player)) + self.assertFalse(self.multiworld.state.can_reach("Orange Tower Third Floor", "Region", self.player)) + + self.collect_by_name("Yellow") + self.assertTrue(self.multiworld.state.can_reach("Orange Tower Third Floor", "Region", self.player)) + self.assertTrue(self.multiworld.state.can_reach("Outside The Initiated", "Region", self.player)) + + +class TestSimpleDoorsNormalSunwarps(LingoTestBase): + options = { + "shuffle_doors": "simple", + "sunwarp_access": "normal" + } + + def test_access(self): + self.assertFalse(self.multiworld.state.can_reach("Crossroads", "Region", self.player)) + + self.collect_by_name("Second Room - Exit Door") + self.assertTrue(self.multiworld.state.can_reach("Crossroads", "Region", self.player)) + self.assertFalse(self.multiworld.state.can_reach("Orange Tower Third Floor", "Region", self.player)) + + self.collect_by_name(["Crossroads - Tower Entrances", "Orange Tower Fourth Floor - Hot Crusts Door"]) + self.assertTrue(self.multiworld.state.can_reach("Orange Tower Third Floor", "Region", self.player)) + self.assertTrue(self.multiworld.state.can_reach("Outside The Initiated", "Region", self.player)) + + +class TestSimpleDoorsDisabledSunwarps(LingoTestBase): + options = { + "shuffle_doors": "simple", + "sunwarp_access": "disabled" + } + + def test_access(self): + self.assertFalse(self.multiworld.state.can_reach("Crossroads", "Region", self.player)) + + self.collect_by_name("Second Room - Exit Door") + self.assertFalse(self.multiworld.state.can_reach("Crossroads", "Region", self.player)) + self.assertFalse(self.multiworld.state.can_reach("Orange Tower Third Floor", "Region", self.player)) + + self.collect_by_name(["Hub Room - Crossroads Entrance", "Crossroads - Tower Entrancse", + "Orange Tower Fourth Floor - Hot Crusts Door"]) + self.assertFalse(self.multiworld.state.can_reach("Orange Tower Third Floor", "Region", self.player)) + self.assertFalse(self.multiworld.state.can_reach("Outside The Initiated", "Region", self.player)) + + +class TestSimpleDoorsUnlockSunwarps(LingoTestBase): + options = { + "shuffle_doors": "simple", + "sunwarp_access": "unlock" + } + + def test_access(self): + self.assertFalse(self.multiworld.state.can_reach("Crossroads", "Region", self.player)) + + self.collect_by_name("Second Room - Exit Door") + self.assertFalse(self.multiworld.state.can_reach("Crossroads", "Region", self.player)) + + self.collect_by_name(["Crossroads - Tower Entrances", "Orange Tower Fourth Floor - Hot Crusts Door"]) + self.assertFalse(self.multiworld.state.can_reach("Orange Tower Third Floor", "Region", self.player)) + self.assertFalse(self.multiworld.state.can_reach("Outside The Initiated", "Region", self.player)) + + self.collect_by_name("Sunwarps") + self.assertTrue(self.multiworld.state.can_reach("Crossroads", "Region", self.player)) + self.assertTrue(self.multiworld.state.can_reach("Orange Tower Third Floor", "Region", self.player)) + self.assertTrue(self.multiworld.state.can_reach("Outside The Initiated", "Region", self.player)) + + +class TestComplexDoorsNormalSunwarps(LingoTestBase): + options = { + "shuffle_doors": "complex", + "sunwarp_access": "normal" + } + + def test_access(self): + self.assertFalse(self.multiworld.state.can_reach("Crossroads", "Region", self.player)) + + self.collect_by_name("Second Room - Exit Door") + self.assertTrue(self.multiworld.state.can_reach("Crossroads", "Region", self.player)) + self.assertFalse(self.multiworld.state.can_reach("Orange Tower Third Floor", "Region", self.player)) + + self.collect_by_name(["Crossroads - Tower Entrance", "Orange Tower Fourth Floor - Hot Crusts Door"]) + self.assertTrue(self.multiworld.state.can_reach("Orange Tower Third Floor", "Region", self.player)) + self.assertTrue(self.multiworld.state.can_reach("Outside The Initiated", "Region", self.player)) + + +class TestComplexDoorsDisabledSunwarps(LingoTestBase): + options = { + "shuffle_doors": "complex", + "sunwarp_access": "disabled" + } + + def test_access(self): + self.assertFalse(self.multiworld.state.can_reach("Crossroads", "Region", self.player)) + + self.collect_by_name("Second Room - Exit Door") + self.assertFalse(self.multiworld.state.can_reach("Crossroads", "Region", self.player)) + self.assertFalse(self.multiworld.state.can_reach("Orange Tower Third Floor", "Region", self.player)) + + self.collect_by_name(["Hub Room - Crossroads Entrance", "Crossroads - Tower Entrance", + "Orange Tower Fourth Floor - Hot Crusts Door"]) + self.assertFalse(self.multiworld.state.can_reach("Orange Tower Third Floor", "Region", self.player)) + self.assertFalse(self.multiworld.state.can_reach("Outside The Initiated", "Region", self.player)) + + +class TestComplexDoorsIndividualSunwarps(LingoTestBase): + options = { + "shuffle_doors": "complex", + "sunwarp_access": "individual" + } + + def test_access(self): + self.assertFalse(self.multiworld.state.can_reach("Crossroads", "Region", self.player)) + + self.collect_by_name("Second Room - Exit Door") + self.assertFalse(self.multiworld.state.can_reach("Crossroads", "Region", self.player)) + + self.collect_by_name("1 Sunwarp") + self.assertTrue(self.multiworld.state.can_reach("Crossroads", "Region", self.player)) + + self.collect_by_name(["Crossroads - Tower Entrance", "Orange Tower Fourth Floor - Hot Crusts Door"]) + self.assertFalse(self.multiworld.state.can_reach("Orange Tower Third Floor", "Region", self.player)) + self.assertFalse(self.multiworld.state.can_reach("Outside The Initiated", "Region", self.player)) + + self.collect_by_name("2 Sunwarp") + self.assertTrue(self.multiworld.state.can_reach("Orange Tower Third Floor", "Region", self.player)) + self.assertFalse(self.multiworld.state.can_reach("Outside The Initiated", "Region", self.player)) + + self.collect_by_name("3 Sunwarp") + self.assertTrue(self.multiworld.state.can_reach("Outside The Initiated", "Region", self.player)) + + +class TestComplexDoorsProgressiveSunwarps(LingoTestBase): + options = { + "shuffle_doors": "complex", + "sunwarp_access": "progressive" + } + + def test_access(self): + self.assertFalse(self.multiworld.state.can_reach("Crossroads", "Region", self.player)) + + self.collect_by_name("Second Room - Exit Door") + self.assertFalse(self.multiworld.state.can_reach("Crossroads", "Region", self.player)) + + progressive_pilgrimage = self.get_items_by_name("Progressive Pilgrimage") + self.collect(progressive_pilgrimage[0]) + self.assertTrue(self.multiworld.state.can_reach("Crossroads", "Region", self.player)) + + self.collect_by_name(["Crossroads - Tower Entrance", "Orange Tower Fourth Floor - Hot Crusts Door"]) + self.assertFalse(self.multiworld.state.can_reach("Orange Tower Third Floor", "Region", self.player)) + self.assertFalse(self.multiworld.state.can_reach("Outside The Initiated", "Region", self.player)) + + self.collect(progressive_pilgrimage[1]) + self.assertTrue(self.multiworld.state.can_reach("Orange Tower Third Floor", "Region", self.player)) + self.assertFalse(self.multiworld.state.can_reach("Outside The Initiated", "Region", self.player)) + + self.collect(progressive_pilgrimage[2]) + self.assertTrue(self.multiworld.state.can_reach("Outside The Initiated", "Region", self.player)) + + +class TestUnlockSunwarpPilgrimage(LingoTestBase): + options = { + "sunwarp_access": "unlock", + "shuffle_colors": "false", + "enable_pilgrimage": "true" + } + + def test_access(self): + self.assertFalse(self.can_reach_location("Pilgrim Antechamber - PILGRIM")) + + self.collect_by_name("Sunwarps") + + self.assertTrue(self.can_reach_location("Pilgrim Antechamber - PILGRIM")) + + +class TestIndividualSunwarpPilgrimage(LingoTestBase): + options = { + "sunwarp_access": "individual", + "shuffle_colors": "false", + "enable_pilgrimage": "true" + } + + def test_access(self): + for i in range(1, 7): + self.assertFalse(self.can_reach_location("Pilgrim Antechamber - PILGRIM")) + self.collect_by_name(f"{i} Sunwarp") + + self.assertTrue(self.can_reach_location("Pilgrim Antechamber - PILGRIM")) + + +class TestProgressiveSunwarpPilgrimage(LingoTestBase): + options = { + "sunwarp_access": "progressive", + "shuffle_colors": "false", + "enable_pilgrimage": "true" + } + + def test_access(self): + for item in self.get_items_by_name("Progressive Pilgrimage"): + self.assertFalse(self.can_reach_location("Pilgrim Antechamber - PILGRIM")) + self.collect(item) + + self.assertTrue(self.can_reach_location("Pilgrim Antechamber - PILGRIM")) diff --git a/worlds/lingo/utils/pickle_static_data.py b/worlds/lingo/utils/pickle_static_data.py index 5d6fa1e68328..10ec69be3537 100644 --- a/worlds/lingo/utils/pickle_static_data.py +++ b/worlds/lingo/utils/pickle_static_data.py @@ -1,4 +1,4 @@ -from typing import Dict, List, Set +from typing import Dict, List, Set, Optional import os import sys @@ -6,7 +6,8 @@ sys.path.append(os.path.join("worlds", "lingo")) sys.path.append(".") sys.path.append("..") -from datatypes import Door, Painting, Panel, Progression, Room, RoomAndDoor, RoomAndPanel, RoomEntrance +from datatypes import Door, DoorType, EntranceType, Painting, Panel, Progression, Room, RoomAndDoor, RoomAndPanel,\ + RoomEntrance import hashlib import pickle @@ -28,6 +29,9 @@ REQUIRED_PAINTING_ROOMS: List[str] = [] REQUIRED_PAINTING_WHEN_NO_DOORS_ROOMS: List[str] = [] +SUNWARP_ENTRANCES: List[str] = ["", "", "", "", "", ""] +SUNWARP_EXITS: List[str] = ["", "", "", "", "", ""] + SPECIAL_ITEM_IDS: Dict[str, int] = {} PANEL_LOCATION_IDS: Dict[str, Dict[str, int]] = {} DOOR_LOCATION_IDS: Dict[str, Dict[str, int]] = {} @@ -96,41 +100,51 @@ def load_static_data(ll1_path, ids_path): PAINTING_EXITS = len(PAINTING_EXIT_ROOMS) -def process_entrance(source_room, doors, room_obj): +def process_single_entrance(source_room: str, room_name: str, door_obj) -> RoomEntrance: global PAINTING_ENTRANCES, PAINTING_EXIT_ROOMS + entrance_type = EntranceType.NORMAL + if "painting" in door_obj and door_obj["painting"]: + entrance_type = EntranceType.PAINTING + elif "sunwarp" in door_obj and door_obj["sunwarp"]: + entrance_type = EntranceType.SUNWARP + elif "warp" in door_obj and door_obj["warp"]: + entrance_type = EntranceType.WARP + elif source_room == "Crossroads" and room_name == "Roof": + entrance_type = EntranceType.CROSSROADS_ROOF_ACCESS + + if "painting" in door_obj and door_obj["painting"]: + PAINTING_EXIT_ROOMS.add(room_name) + PAINTING_ENTRANCES += 1 + + if "door" in door_obj: + return RoomEntrance(source_room, RoomAndDoor( + door_obj["room"] if "room" in door_obj else None, + door_obj["door"] + ), entrance_type) + else: + return RoomEntrance(source_room, None, entrance_type) + + +def process_entrance(source_room, doors, room_obj): # If the value of an entrance is just True, that means that the entrance is always accessible. if doors is True: - room_obj.entrances.append(RoomEntrance(source_room, None, False)) + room_obj.entrances.append(RoomEntrance(source_room, None, EntranceType.NORMAL)) elif isinstance(doors, dict): # If the value of an entrance is a dictionary, that means the entrance requires a door to be accessible, is a # painting-based entrance, or both. - if "painting" in doors and "door" not in doors: - PAINTING_EXIT_ROOMS.add(room_obj.name) - PAINTING_ENTRANCES += 1 - - room_obj.entrances.append(RoomEntrance(source_room, None, True)) - else: - if "painting" in doors and doors["painting"]: - PAINTING_EXIT_ROOMS.add(room_obj.name) - PAINTING_ENTRANCES += 1 - - room_obj.entrances.append(RoomEntrance(source_room, RoomAndDoor( - doors["room"] if "room" in doors else None, - doors["door"] - ), doors["painting"] if "painting" in doors else False)) + room_obj.entrances.append(process_single_entrance(source_room, room_obj.name, doors)) else: # If the value of an entrance is a list, then there are multiple possible doors that can give access to the - # entrance. + # entrance. If there are multiple connections with the same door (or lack of door) that differ only by entrance + # type, coalesce them into one entrance. + entrances: Dict[Optional[RoomAndDoor], EntranceType] = {} for door in doors: - if "painting" in door and door["painting"]: - PAINTING_EXIT_ROOMS.add(room_obj.name) - PAINTING_ENTRANCES += 1 + entrance = process_single_entrance(source_room, room_obj.name, door) + entrances[entrance.door] = entrances.get(entrance.door, EntranceType(0)) | entrance.type - room_obj.entrances.append(RoomEntrance(source_room, RoomAndDoor( - door["room"] if "room" in door else None, - door["door"] - ), door["painting"] if "painting" in door else False)) + for door, entrance_type in entrances.items(): + room_obj.entrances.append(RoomEntrance(source_room, door, entrance_type)) def process_panel(room_name, panel_name, panel_data): @@ -250,11 +264,6 @@ def process_door(room_name, door_name, door_data): else: include_reduce = False - if "junk_item" in door_data: - junk_item = door_data["junk_item"] - else: - junk_item = False - if "door_group" in door_data: door_group = door_data["door_group"] else: @@ -276,7 +285,7 @@ def process_door(room_name, door_name, door_data): panels.append(RoomAndPanel(None, panel)) else: skip_location = True - panels = None + panels = [] # The location name associated with a door can be explicitly specified in the configuration. If it is not, then the # name is generated using a combination of all of the panels that would ordinarily open the door. This can get quite @@ -312,8 +321,14 @@ def process_door(room_name, door_name, door_data): else: painting_ids = [] + door_type = DoorType.NORMAL + if door_name.endswith(" Sunwarp"): + door_type = DoorType.SUNWARP + elif room_name == "Pilgrim Antechamber" and door_name == "Sun Painting": + door_type = DoorType.SUN_PAINTING + door_obj = Door(door_name, item_name, location_name, panels, skip_location, skip_item, has_doors, - painting_ids, event, door_group, include_reduce, junk_item, item_group) + painting_ids, event, door_group, include_reduce, door_type, item_group) DOORS_BY_ROOM[room_name][door_name] = door_obj @@ -377,6 +392,15 @@ def process_painting(room_name, painting_data): PAINTINGS[painting_id] = painting_obj +def process_sunwarp(room_name, sunwarp_data): + global SUNWARP_ENTRANCES, SUNWARP_EXITS + + if sunwarp_data["direction"] == "enter": + SUNWARP_ENTRANCES[sunwarp_data["dots"] - 1] = room_name + else: + SUNWARP_EXITS[sunwarp_data["dots"] - 1] = room_name + + def process_progression(room_name, progression_name, progression_doors): global PROGRESSIVE_ITEMS, PROGRESSION_BY_ROOM @@ -422,6 +446,10 @@ def process_room(room_name, room_data): for painting_data in room_data["paintings"]: process_painting(room_name, painting_data) + if "sunwarps" in room_data: + for sunwarp_data in room_data["sunwarps"]: + process_sunwarp(room_name, sunwarp_data) + if "progression" in room_data: for progression_name, progression_doors in room_data["progression"].items(): process_progression(room_name, progression_name, progression_doors) @@ -468,6 +496,8 @@ def process_room(room_name, room_data): "PAINTING_EXITS": PAINTING_EXITS, "REQUIRED_PAINTING_ROOMS": REQUIRED_PAINTING_ROOMS, "REQUIRED_PAINTING_WHEN_NO_DOORS_ROOMS": REQUIRED_PAINTING_WHEN_NO_DOORS_ROOMS, + "SUNWARP_ENTRANCES": SUNWARP_ENTRANCES, + "SUNWARP_EXITS": SUNWARP_EXITS, "SPECIAL_ITEM_IDS": SPECIAL_ITEM_IDS, "PANEL_LOCATION_IDS": PANEL_LOCATION_IDS, "DOOR_LOCATION_IDS": DOOR_LOCATION_IDS, diff --git a/worlds/lingo/utils/validate_config.rb b/worlds/lingo/utils/validate_config.rb index ae0ac61cdb1b..831fee2ad312 100644 --- a/worlds/lingo/utils/validate_config.rb +++ b/worlds/lingo/utils/validate_config.rb @@ -37,12 +37,14 @@ mentioned_rooms = Set[] mentioned_doors = Set[] mentioned_panels = Set[] +mentioned_sunwarp_entrances = Set[] +mentioned_sunwarp_exits = Set[] door_groups = {} -directives = Set["entrances", "panels", "doors", "paintings", "progression"] +directives = Set["entrances", "panels", "doors", "paintings", "sunwarps", "progression"] panel_directives = Set["id", "required_room", "required_door", "required_panel", "colors", "check", "exclude_reduce", "tag", "link", "subtag", "achievement", "copy_to_sign", "non_counting", "hunt"] -door_directives = Set["id", "painting_id", "panels", "item_name", "item_group", "location_name", "skip_location", "skip_item", "door_group", "include_reduce", "junk_item", "event"] +door_directives = Set["id", "painting_id", "panels", "item_name", "item_group", "location_name", "skip_location", "skip_item", "door_group", "include_reduce", "event", "warp_id"] painting_directives = Set["id", "enter_only", "exit_only", "orientation", "required_door", "required", "required_when_no_doors", "move", "req_blocked", "req_blocked_when_no_doors"] non_counting = 0 @@ -67,17 +69,17 @@ entrances = [] if entrance.kind_of? Hash - if entrance.keys() != ["painting"] then - entrances = [entrance] - end + entrances = [entrance] elsif entrance.kind_of? Array entrances = entrance end entrances.each do |e| - entrance_room = e.include?("room") ? e["room"] : room_name - mentioned_rooms.add(entrance_room) - mentioned_doors.add(entrance_room + " - " + e["door"]) + if e.include?("door") then + entrance_room = e.include?("room") ? e["room"] : room_name + mentioned_rooms.add(entrance_room) + mentioned_doors.add(entrance_room + " - " + e["door"]) + end end end @@ -204,8 +206,8 @@ end end - if not door.include?("id") and not door.include?("painting_id") and not door["skip_item"] and not door["event"] then - puts "#{room_name} - #{door_name} :::: Should be marked skip_item or event if there are no doors or paintings" + if not door.include?("id") and not door.include?("painting_id") and not door.include?("warp_id") and not door["skip_item"] and not door["event"] then + puts "#{room_name} - #{door_name} :::: Should be marked skip_item or event if there are no doors, paintings, or warps" end if door.include?("panels") @@ -292,6 +294,32 @@ end end + (room["sunwarps"] || []).each do |sunwarp| + if sunwarp.include? "dots" and sunwarp.include? "direction" then + if sunwarp["dots"] < 1 or sunwarp["dots"] > 6 then + puts "#{room_name} :::: Contains a sunwarp with an invalid dots value" + end + + if sunwarp["direction"] == "enter" then + if mentioned_sunwarp_entrances.include? sunwarp["dots"] then + puts "Multiple #{sunwarp["dots"]} sunwarp entrances were found" + else + mentioned_sunwarp_entrances.add(sunwarp["dots"]) + end + elsif sunwarp["direction"] == "exit" then + if mentioned_sunwarp_exits.include? sunwarp["dots"] then + puts "Multiple #{sunwarp["dots"]} sunwarp exits were found" + else + mentioned_sunwarp_exits.add(sunwarp["dots"]) + end + else + puts "#{room_name} :::: Contains a sunwarp with an invalid direction value" + end + else + puts "#{room_name} :::: Contains a sunwarp without a dots and direction" + end + end + (room["progression"] || {}).each do |progression_name, door_list| door_list.each do |door| if door.kind_of? Hash then From 444178171bbb6701065219e93db356bf109d3b5f Mon Sep 17 00:00:00 2001 From: qwint Date: Thu, 18 Apr 2024 11:46:00 -0500 Subject: [PATCH 072/153] Docs: adds new commonclient commands to webhost docs (#3151) --- worlds/generic/docs/commands_en.md | 2 ++ 1 file changed, 2 insertions(+) diff --git a/worlds/generic/docs/commands_en.md b/worlds/generic/docs/commands_en.md index fe12f10ee3af..317f724109e1 100644 --- a/worlds/generic/docs/commands_en.md +++ b/worlds/generic/docs/commands_en.md @@ -95,7 +95,9 @@ The following commands are available in the clients that use the CommonClient, f - `/received` Displays all the items you have received from all players, including yourself. - `/missing` Displays all the locations along with their current status (checked/missing). - `/items` Lists all the item names for the current game. +- `/item_groups` Lists all the item group names for the current game. - `/locations` Lists all the location names for the current game. +- `/location_groups` Lists all the location group names for the current game. - `/ready` Sends ready status to the server. - Typing anything that doesn't start with `/` will broadcast a message to all players. From 21184b59d24aac2664a8af7ded8ea08c62825bac Mon Sep 17 00:00:00 2001 From: Zach Parks Date: Thu, 18 Apr 2024 11:46:48 -0500 Subject: [PATCH 073/153] MultiServer: Prevent invalid `*_mode` option values. (#3149) --- MultiServer.py | 51 ++++++++++++++++++++++++++------------------------ 1 file changed, 27 insertions(+), 24 deletions(-) diff --git a/MultiServer.py b/MultiServer.py index e1f524ced756..3052046a343d 100644 --- a/MultiServer.py +++ b/MultiServer.py @@ -2134,32 +2134,35 @@ def _cmd_hint_location(self, player_name: str, *location_name: str) -> bool: self.output(response) return False - def _cmd_option(self, option_name: str, option: str): - """Set options for the server.""" - - attrtype = self.ctx.simple_options.get(option_name, None) - if attrtype: - if attrtype == bool: - def attrtype(input_text: str): - return input_text.lower() not in {"off", "0", "false", "none", "null", "no"} - elif attrtype == str and option_name.endswith("password"): - def attrtype(input_text: str): - if input_text.lower() in {"null", "none", '""', "''"}: - return None - return input_text - setattr(self.ctx, option_name, attrtype(option)) - self.output(f"Set option {option_name} to {getattr(self.ctx, option_name)}") - if option_name in {"release_mode", "remaining_mode", "collect_mode"}: - self.ctx.broadcast_all([{"cmd": "RoomUpdate", 'permissions': get_permissions(self.ctx)}]) - elif option_name in {"hint_cost", "location_check_points"}: - self.ctx.broadcast_all([{"cmd": "RoomUpdate", option_name: getattr(self.ctx, option_name)}]) - return True - else: - known = (f"{option}:{otype}" for option, otype in self.ctx.simple_options.items()) - self.output(f"Unrecognized Option {option_name}, known: " - f"{', '.join(known)}") + def _cmd_option(self, option_name: str, option_value: str): + """Set an option for the server.""" + value_type = self.ctx.simple_options.get(option_name, None) + if not value_type: + known_options = (f"{option}: {option_type}" for option, option_type in self.ctx.simple_options.items()) + self.output(f"Unrecognized option '{option_name}', known: {', '.join(known_options)}") return False + if value_type == bool: + def value_type(input_text: str): + return input_text.lower() not in {"off", "0", "false", "none", "null", "no"} + elif value_type == str and option_name.endswith("password"): + def value_type(input_text: str): + return None if input_text.lower() in {"null", "none", '""', "''"} else input_text + elif value_type == str and option_name.endswith("mode"): + valid_values = {"goal", "enabled", "disabled"} + valid_values.update(("auto", "auto_enabled") if option_name != "remaining_mode" else []) + if option_value.lower() not in valid_values: + self.output(f"Unrecognized {option_name} value '{option_value}', known: {', '.join(valid_values)}") + return False + + setattr(self.ctx, option_name, value_type(option_value)) + self.output(f"Set option {option_name} to {getattr(self.ctx, option_name)}") + if option_name in {"release_mode", "remaining_mode", "collect_mode"}: + self.ctx.broadcast_all([{"cmd": "RoomUpdate", 'permissions': get_permissions(self.ctx)}]) + elif option_name in {"hint_cost", "location_check_points"}: + self.ctx.broadcast_all([{"cmd": "RoomUpdate", option_name: getattr(self.ctx, option_name)}]) + return True + async def console(ctx: Context): import sys From fec533b65e01572a1f46e70820362d7707469326 Mon Sep 17 00:00:00 2001 From: Nicholas Brochu Date: Thu, 18 Apr 2024 12:47:27 -0400 Subject: [PATCH 074/153] Zork Grand Inquisitor: Fix Determinism Issues on Fixed Seeds (#3134) --- worlds/zork_grand_inquisitor/data_funcs.py | 24 +++++++++++----------- worlds/zork_grand_inquisitor/world.py | 9 ++++---- 2 files changed, 17 insertions(+), 16 deletions(-) diff --git a/worlds/zork_grand_inquisitor/data_funcs.py b/worlds/zork_grand_inquisitor/data_funcs.py index 9ea806e8aa4d..2a7bff1fbb6b 100644 --- a/worlds/zork_grand_inquisitor/data_funcs.py +++ b/worlds/zork_grand_inquisitor/data_funcs.py @@ -1,4 +1,4 @@ -from typing import Dict, Set, Tuple, Union +from typing import Dict, List, Set, Tuple, Union from .data.entrance_rule_data import entrance_rule_data from .data.item_data import item_data, ZorkGrandInquisitorItemData @@ -54,15 +54,15 @@ def id_to_locations() -> Dict[int, ZorkGrandInquisitorLocations]: } -def item_groups() -> Dict[str, Set[str]]: - groups: Dict[str, Set[str]] = dict() +def item_groups() -> Dict[str, List[str]]: + groups: Dict[str, List[str]] = dict() item: ZorkGrandInquisitorItems data: ZorkGrandInquisitorItemData for item, data in item_data.items(): if data.tags is not None: for tag in data.tags: - groups.setdefault(tag.value, set()).add(item.value) + groups.setdefault(tag.value, list()).append(item.value) return {k: v for k, v in groups.items() if len(v)} @@ -92,31 +92,31 @@ def game_id_to_items() -> Dict[int, ZorkGrandInquisitorItems]: return mapping -def location_groups() -> Dict[str, Set[str]]: - groups: Dict[str, Set[str]] = dict() +def location_groups() -> Dict[str, List[str]]: + groups: Dict[str, List[str]] = dict() tag: ZorkGrandInquisitorTags for tag in ZorkGrandInquisitorTags: - groups[tag.value] = set() + groups[tag.value] = list() location: ZorkGrandInquisitorLocations data: ZorkGrandInquisitorLocationData for location, data in location_data.items(): if data.tags is not None: for tag in data.tags: - groups[tag.value].add(location.value) + groups[tag.value].append(location.value) return {k: v for k, v in groups.items() if len(v)} def locations_by_region(include_deathsanity: bool = False) -> Dict[ - ZorkGrandInquisitorRegions, Set[ZorkGrandInquisitorLocations] + ZorkGrandInquisitorRegions, List[ZorkGrandInquisitorLocations] ]: - mapping: Dict[ZorkGrandInquisitorRegions, Set[ZorkGrandInquisitorLocations]] = dict() + mapping: Dict[ZorkGrandInquisitorRegions, List[ZorkGrandInquisitorLocations]] = dict() region: ZorkGrandInquisitorRegions for region in ZorkGrandInquisitorRegions: - mapping[region] = set() + mapping[region] = list() location: ZorkGrandInquisitorLocations data: ZorkGrandInquisitorLocationData @@ -126,7 +126,7 @@ def locations_by_region(include_deathsanity: bool = False) -> Dict[ ): continue - mapping[data.region].add(location) + mapping[data.region].append(location) return mapping diff --git a/worlds/zork_grand_inquisitor/world.py b/worlds/zork_grand_inquisitor/world.py index 66f062631cbf..a93f2c2134c1 100644 --- a/worlds/zork_grand_inquisitor/world.py +++ b/worlds/zork_grand_inquisitor/world.py @@ -1,4 +1,4 @@ -from typing import Any, Dict, List, Set, Tuple +from typing import Any, Dict, List, Tuple from BaseClasses import Item, ItemClassification, Location, Region, Tutorial @@ -78,6 +78,7 @@ class ZorkGrandInquisitorWorld(World): web = ZorkGrandInquisitorWebWorld() + filler_item_names: List[str] = item_groups()["Filler"] item_name_to_item: Dict[str, ZorkGrandInquisitorItems] = item_names_to_item() def create_regions(self) -> None: @@ -89,13 +90,13 @@ def create_regions(self) -> None: for region_enum_item in region_data.keys(): region_mapping[region_enum_item] = Region(region_enum_item.value, self.player, self.multiworld) - region_locations_mapping: Dict[ZorkGrandInquisitorRegions, Set[ZorkGrandInquisitorLocations]] + region_locations_mapping: Dict[ZorkGrandInquisitorRegions, List[ZorkGrandInquisitorLocations]] region_locations_mapping = locations_by_region(include_deathsanity=deathsanity) region_enum_item: ZorkGrandInquisitorRegions region: Region for region_enum_item, region in region_mapping.items(): - regions_locations: Set[ZorkGrandInquisitorLocations] = region_locations_mapping[region_enum_item] + regions_locations: List[ZorkGrandInquisitorLocations] = region_locations_mapping[region_enum_item] # Locations location_enum_item: ZorkGrandInquisitorLocations @@ -201,4 +202,4 @@ def fill_slot_data(self) -> Dict[str, Any]: ) def get_filler_item_name(self) -> str: - return self.random.choice(list(self.item_name_groups["Filler"])) + return self.random.choice(self.filler_item_names) From 1faaa0d9419c95f7a7f8afa31ff093d68aff7157 Mon Sep 17 00:00:00 2001 From: NewSoupVi <57900059+NewSoupVi@users.noreply.github.com> Date: Thu, 18 Apr 2024 18:49:15 +0200 Subject: [PATCH 075/153] The Witness: Increase variety of the starting item (#3047) --- worlds/witness/player_items.py | 5 +---- 1 file changed, 1 insertion(+), 4 deletions(-) diff --git a/worlds/witness/player_items.py b/worlds/witness/player_items.py index 925b21ae6de6..627e5acccb90 100644 --- a/worlds/witness/player_items.py +++ b/worlds/witness/player_items.py @@ -154,10 +154,7 @@ def get_early_items(self) -> List[str]: """ output: Set[str] = set() if self._world.options.shuffle_symbols: - if self._world.options.shuffle_doors: - output = {"Dots", "Black/White Squares", "Symmetry"} - else: - output = {"Dots", "Black/White Squares", "Symmetry", "Shapers", "Stars"} + output = {"Dots", "Black/White Squares", "Symmetry", "Shapers", "Stars"} if self._world.options.shuffle_discarded_panels: if self._world.options.puzzle_randomization == "sigma_expert": From 3343d4e36438fecdd135e0db823a10c6a96e0f78 Mon Sep 17 00:00:00 2001 From: Doug Hoskisson Date: Thu, 18 Apr 2024 09:50:17 -0700 Subject: [PATCH 076/153] SM: clean post_fill function (#2863) --- worlds/sm/__init__.py | 30 ++++++++++++++++++++---------- 1 file changed, 20 insertions(+), 10 deletions(-) diff --git a/worlds/sm/__init__.py b/worlds/sm/__init__.py index 3e9015eab766..7f12bf484c0f 100644 --- a/worlds/sm/__init__.py +++ b/worlds/sm/__init__.py @@ -358,16 +358,26 @@ def pre_fill(self): def post_fill(self): def get_player_ItemLocation(progression_only: bool): return [ - ItemLocation(copy.copy(ItemManager.Items[ - itemLoc.item.type if isinstance(itemLoc.item, SMItem) and itemLoc.item.type in ItemManager.Items else - 'ArchipelagoItem']), - copy.copy(locationsDict[itemLoc.name] if itemLoc.game == self.game else - locationsDict[first_local_collected_loc.name]), - itemLoc.item.player, - True) - for itemLoc in spheres if itemLoc.item.player == self.player and (not progression_only or itemLoc.item.advancement) - ] - + ItemLocation( + copy.copy( + ItemManager.Items[ + itemLoc.item.type + if isinstance(itemLoc.item, SMItem) and itemLoc.item.type in ItemManager.Items + else 'ArchipelagoItem' + ] + ), + copy.copy( + locationsDict[itemLoc.name] + if itemLoc.game == self.game + else locationsDict[first_local_collected_loc.name] + ), + itemLoc.item.player, + True + ) + for itemLoc in spheres + if itemLoc.item.player == self.player and (not progression_only or itemLoc.item.advancement) + ] + # Having a sorted itemLocs from collection order is required for escapeTrigger when Tourian is Disabled. # We cant use stage_post_fill for this as its called after worlds' post_fill. # get_spheres could be cached in multiworld? From 8b8df9fa330e36c0eb4379e084f3e411b1001690 Mon Sep 17 00:00:00 2001 From: Bryce Wilson Date: Thu, 18 Apr 2024 10:51:49 -0600 Subject: [PATCH 077/153] Pokemon Emerald: Fix missing region for water encounters in Dewford (#3103) --- worlds/pokemon_emerald/data/regions/cities.json | 13 ++++++++++++- worlds/pokemon_emerald/rules.py | 4 ++++ 2 files changed, 16 insertions(+), 1 deletion(-) diff --git a/worlds/pokemon_emerald/data/regions/cities.json b/worlds/pokemon_emerald/data/regions/cities.json index 063fb6a12b9b..2bd21e162807 100644 --- a/worlds/pokemon_emerald/data/regions/cities.json +++ b/worlds/pokemon_emerald/data/regions/cities.json @@ -1143,7 +1143,7 @@ "REGION_DEWFORD_TOWN/MAIN": { "parent_map": "MAP_DEWFORD_TOWN", "has_grass": false, - "has_water": true, + "has_water": false, "has_fishing": true, "locations": [ "NPC_GIFT_RECEIVED_OLD_ROD" @@ -1152,6 +1152,7 @@ "EVENT_VISITED_DEWFORD_TOWN" ], "exits": [ + "REGION_DEWFORD_TOWN/WATER", "REGION_ROUTE106/EAST", "REGION_ROUTE107/MAIN", "REGION_ROUTE104_MR_BRINEYS_HOUSE/MAIN", @@ -1165,6 +1166,16 @@ "MAP_DEWFORD_TOWN:4/MAP_DEWFORD_TOWN_HOUSE2:0" ] }, + "REGION_DEWFORD_TOWN/WATER": { + "parent_map": "MAP_DEWFORD_TOWN", + "has_grass": false, + "has_water": true, + "has_fishing": true, + "locations": [], + "events": [], + "exits": [], + "warps": [] + }, "REGION_DEWFORD_TOWN_HALL/MAIN": { "parent_map": "MAP_DEWFORD_TOWN_HALL", "has_grass": false, diff --git a/worlds/pokemon_emerald/rules.py b/worlds/pokemon_emerald/rules.py index 0b5c6b79c03b..816fbdd0cccb 100644 --- a/worlds/pokemon_emerald/rules.py +++ b/worlds/pokemon_emerald/rules.py @@ -427,6 +427,10 @@ def get_location(location: str): state.can_reach("REGION_ROUTE104_MR_BRINEYS_HOUSE/MAIN -> REGION_DEWFORD_TOWN/MAIN", "Entrance", world.player) and state.has("EVENT_TALK_TO_MR_STONE", world.player) ) + set_rule( + get_entrance("REGION_DEWFORD_TOWN/MAIN -> REGION_DEWFORD_TOWN/WATER"), + hm_rules["HM03 Surf"] + ) # Granite Cave set_rule( From 6f7c2fa25f7feaa1738ebfb5db0c9237f7475143 Mon Sep 17 00:00:00 2001 From: Silvris <58583688+Silvris@users.noreply.github.com> Date: Thu, 18 Apr 2024 11:52:23 -0500 Subject: [PATCH 078/153] KDL3: Fix invalid animal placements and fill error (#3152) --- worlds/kdl3/Regions.py | 24 +++++++++++++----------- worlds/kdl3/__init__.py | 4 +++- 2 files changed, 16 insertions(+), 12 deletions(-) diff --git a/worlds/kdl3/Regions.py b/worlds/kdl3/Regions.py index 8909c58be3e5..ac27d8bbf517 100644 --- a/worlds/kdl3/Regions.py +++ b/worlds/kdl3/Regions.py @@ -1,8 +1,8 @@ import orjson import os -import typing from pkgutil import get_data +from typing import TYPE_CHECKING, List, Dict, Optional, Union from BaseClasses import Region from worlds.generic.Rules import add_item_rule from .Locations import KDL3Location @@ -10,7 +10,7 @@ from .Options import BossShuffle from .Room import KDL3Room -if typing.TYPE_CHECKING: +if TYPE_CHECKING: from . import KDL3World default_levels = { @@ -39,22 +39,24 @@ } -def generate_valid_level(world: "KDL3World", level, stage, possible_stages, placed_stages): +def generate_valid_level(world: "KDL3World", level: int, stage: int, + possible_stages: List[int], placed_stages: List[int]): new_stage = world.random.choice(possible_stages) if level == 1: if stage == 0 and new_stage in first_stage_blacklist: return generate_valid_level(world, level, stage, possible_stages, placed_stages) - elif not (world.multiworld.players > 1 or world.options.consumables or world.options.starsanity) and \ - new_stage in first_world_limit and \ - sum(p_stage in first_world_limit for p_stage in placed_stages) >= 2: + elif (not (world.multiworld.players > 1 or world.options.consumables or world.options.starsanity) and + new_stage in first_world_limit and + sum(p_stage in first_world_limit for p_stage in placed_stages) + >= (2 if world.options.open_world else 1)): return generate_valid_level(world, level, stage, possible_stages, placed_stages) return new_stage -def generate_rooms(world: "KDL3World", level_regions: typing.Dict[int, Region]): +def generate_rooms(world: "KDL3World", level_regions: Dict[int, Region]): level_names = {LocationName.level_names[level]: level for level in LocationName.level_names} room_data = orjson.loads(get_data(__name__, os.path.join("data", "Rooms.json"))) - rooms: typing.Dict[str, KDL3Room] = dict() + rooms: Dict[str, KDL3Room] = dict() for room_entry in room_data: room = KDL3Room(room_entry["name"], world.player, world.multiworld, None, room_entry["level"], room_entry["stage"], room_entry["room"], room_entry["pointer"], room_entry["music"], @@ -75,7 +77,7 @@ def generate_rooms(world: "KDL3World", level_regions: typing.Dict[int, Region]): world.rooms = list(rooms.values()) world.multiworld.regions.extend(world.rooms) - first_rooms: typing.Dict[int, KDL3Room] = dict() + first_rooms: Dict[int, KDL3Room] = dict() for name, room in rooms.items(): if room.room == 0: if room.stage == 7: @@ -118,7 +120,7 @@ def generate_rooms(world: "KDL3World", level_regions: typing.Dict[int, Region]): def generate_valid_levels(world: "KDL3World", enforce_world: bool, enforce_pattern: bool) -> dict: - levels: typing.Dict[int, typing.List[typing.Optional[int]]] = { + levels: Dict[int, List[Optional[int]]] = { 1: [None] * 7, 2: [None] * 7, 3: [None] * 7, @@ -158,7 +160,7 @@ def generate_valid_levels(world: "KDL3World", enforce_world: bool, enforce_patte raise Exception(f"Failed to find valid stage for {level}-{stage}. Remaining Stages:{possible_stages}") # now handle bosses - boss_shuffle: typing.Union[int, str] = world.options.boss_shuffle.value + boss_shuffle: Union[int, str] = world.options.boss_shuffle.value plando_bosses = [] if isinstance(boss_shuffle, str): # boss plando diff --git a/worlds/kdl3/__init__.py b/worlds/kdl3/__init__.py index be299f6f2c12..8c9f3cc46a4e 100644 --- a/worlds/kdl3/__init__.py +++ b/worlds/kdl3/__init__.py @@ -203,11 +203,13 @@ def pre_fill(self) -> None: animal_pool.append("Coo Spawn") else: animal_pool.append("Kine Spawn") + # Weird fill hack, this forces ChuChu to be the last animal friend placed + # If Kine is ever the last animal friend placed, he will cause fill errors on closed world + animal_pool.sort() locations = [self.multiworld.get_location(spawn, self.player) for spawn in spawns] items = [self.create_item(animal) for animal in animal_pool] allstate = self.multiworld.get_all_state(False) self.random.shuffle(locations) - self.random.shuffle(items) fill_restrictive(self.multiworld, allstate, locations, items, True, True) else: animal_friends = animal_friend_spawns.copy() From 2c80a9b8f1c55c84331263bdfe89aa064ebceb32 Mon Sep 17 00:00:00 2001 From: David St-Louis Date: Thu, 18 Apr 2024 12:53:09 -0400 Subject: [PATCH 079/153] Heretic: Update to use new Options + logic fixes + Doc fix (#3139) --- worlds/heretic/Locations.py | 22 +- worlds/heretic/Options.py | 43 ++-- worlds/heretic/Regions.py | 19 +- worlds/heretic/Rules.py | 440 ++++++++++++++++---------------- worlds/heretic/__init__.py | 39 +-- worlds/heretic/docs/setup_en.md | 2 +- 6 files changed, 289 insertions(+), 276 deletions(-) diff --git a/worlds/heretic/Locations.py b/worlds/heretic/Locations.py index f9590de77660..ff32df7b34c5 100644 --- a/worlds/heretic/Locations.py +++ b/worlds/heretic/Locations.py @@ -1266,7 +1266,7 @@ class LocationDict(TypedDict, total=False): 'map': 3, 'index': 10, 'doom_type': 79, - 'region': "The River of Fire (E2M3) Main"}, + 'region': "The River of Fire (E2M3) Green"}, 371179: {'name': 'The River of Fire (E2M3) - Green key', 'episode': 2, 'check_sanity': False, @@ -1301,7 +1301,7 @@ class LocationDict(TypedDict, total=False): 'map': 3, 'index': 122, 'doom_type': 2003, - 'region': "The River of Fire (E2M3) Main"}, + 'region': "The River of Fire (E2M3) Green"}, 371184: {'name': 'The River of Fire (E2M3) - Hellstaff', 'episode': 2, 'check_sanity': False, @@ -1364,7 +1364,7 @@ class LocationDict(TypedDict, total=False): 'map': 3, 'index': 299, 'doom_type': 32, - 'region': "The River of Fire (E2M3) Main"}, + 'region': "The River of Fire (E2M3) Green"}, 371193: {'name': 'The River of Fire (E2M3) - Morph Ovum', 'episode': 2, 'check_sanity': False, @@ -1385,7 +1385,7 @@ class LocationDict(TypedDict, total=False): 'map': 3, 'index': 413, 'doom_type': 2002, - 'region': "The River of Fire (E2M3) Main"}, + 'region': "The River of Fire (E2M3) Green"}, 371196: {'name': 'The River of Fire (E2M3) - Firemace 2', 'episode': 2, 'check_sanity': True, @@ -2610,7 +2610,7 @@ class LocationDict(TypedDict, total=False): 'map': 2, 'index': 172, 'doom_type': 33, - 'region': "The Cesspool (E3M2) Main"}, + 'region': "The Cesspool (E3M2) Yellow"}, 371371: {'name': 'The Cesspool (E3M2) - Bag of Holding 2', 'episode': 3, 'check_sanity': False, @@ -4360,7 +4360,7 @@ class LocationDict(TypedDict, total=False): 'map': 3, 'index': 297, 'doom_type': 2002, - 'region': "Ambulatory (E4M3) Green"}, + 'region': "Ambulatory (E4M3) Green Lock"}, 371621: {'name': 'Ambulatory (E4M3) - Firemace 2', 'episode': 4, 'check_sanity': False, @@ -6040,7 +6040,7 @@ class LocationDict(TypedDict, total=False): 'map': 3, 'index': 234, 'doom_type': 85, - 'region': "Quay (E5M3) Blue"}, + 'region': "Quay (E5M3) Cyan"}, 371861: {'name': 'Quay (E5M3) - Map Scroll', 'episode': 5, 'check_sanity': True, @@ -6075,7 +6075,7 @@ class LocationDict(TypedDict, total=False): 'map': 3, 'index': 239, 'doom_type': 86, - 'region': "Quay (E5M3) Blue"}, + 'region': "Quay (E5M3) Cyan"}, 371866: {'name': 'Quay (E5M3) - Torch', 'episode': 5, 'check_sanity': False, @@ -6089,7 +6089,7 @@ class LocationDict(TypedDict, total=False): 'map': 3, 'index': 242, 'doom_type': 2002, - 'region': "Quay (E5M3) Blue"}, + 'region': "Quay (E5M3) Cyan"}, 371868: {'name': 'Quay (E5M3) - Firemace 2', 'episode': 5, 'check_sanity': False, @@ -6124,7 +6124,7 @@ class LocationDict(TypedDict, total=False): 'map': 3, 'index': 247, 'doom_type': 2002, - 'region': "Quay (E5M3) Blue"}, + 'region': "Quay (E5M3) Cyan"}, 371873: {'name': 'Quay (E5M3) - Bag of Holding 2', 'episode': 5, 'check_sanity': True, @@ -6138,7 +6138,7 @@ class LocationDict(TypedDict, total=False): 'map': 3, 'index': -1, 'doom_type': -1, - 'region': "Quay (E5M3) Blue"}, + 'region': "Quay (E5M3) Cyan"}, 371875: {'name': 'Courtyard (E5M4) - Blue key', 'episode': 5, 'check_sanity': False, diff --git a/worlds/heretic/Options.py b/worlds/heretic/Options.py index 34255f39eb5a..75e2257a7336 100644 --- a/worlds/heretic/Options.py +++ b/worlds/heretic/Options.py @@ -1,6 +1,5 @@ -import typing - -from Options import AssembleOptions, Choice, Toggle, DeathLink, DefaultOnToggle, StartInventoryPool +from Options import PerGameCommonOptions, Choice, Toggle, DeathLink, DefaultOnToggle, StartInventoryPool +from dataclasses import dataclass class Goal(Choice): @@ -146,22 +145,22 @@ class Episode5(Toggle): display_name = "Episode 5" -options: typing.Dict[str, AssembleOptions] = { - "start_inventory_from_pool": StartInventoryPool, - "goal": Goal, - "difficulty": Difficulty, - "random_monsters": RandomMonsters, - "random_pickups": RandomPickups, - "random_music": RandomMusic, - "allow_death_logic": AllowDeathLogic, - "pro": Pro, - "check_sanity": CheckSanity, - "start_with_map_scrolls": StartWithMapScrolls, - "reset_level_on_death": ResetLevelOnDeath, - "death_link": DeathLink, - "episode1": Episode1, - "episode2": Episode2, - "episode3": Episode3, - "episode4": Episode4, - "episode5": Episode5 -} +@dataclass +class HereticOptions(PerGameCommonOptions): + start_inventory_from_pool: StartInventoryPool + goal: Goal + difficulty: Difficulty + random_monsters: RandomMonsters + random_pickups: RandomPickups + random_music: RandomMusic + allow_death_logic: AllowDeathLogic + pro: Pro + check_sanity: CheckSanity + start_with_map_scrolls: StartWithMapScrolls + reset_level_on_death: ResetLevelOnDeath + death_link: DeathLink + episode1: Episode1 + episode2: Episode2 + episode3: Episode3 + episode4: Episode4 + episode5: Episode5 diff --git a/worlds/heretic/Regions.py b/worlds/heretic/Regions.py index a30f0120a0c4..81a4c9ce49dc 100644 --- a/worlds/heretic/Regions.py +++ b/worlds/heretic/Regions.py @@ -604,7 +604,8 @@ class RegionDict(TypedDict, total=False): "connections":[ {"target":"Ambulatory (E4M3) Blue","pro":False}, {"target":"Ambulatory (E4M3) Yellow","pro":False}, - {"target":"Ambulatory (E4M3) Green","pro":False}]}, + {"target":"Ambulatory (E4M3) Green","pro":False}, + {"target":"Ambulatory (E4M3) Green Lock","pro":False}]}, {"name":"Ambulatory (E4M3) Blue", "connects_to_hub":False, "episode":4, @@ -619,6 +620,12 @@ class RegionDict(TypedDict, total=False): "connects_to_hub":False, "episode":4, "connections":[{"target":"Ambulatory (E4M3) Main","pro":False}]}, + {"name":"Ambulatory (E4M3) Green Lock", + "connects_to_hub":False, + "episode":4, + "connections":[ + {"target":"Ambulatory (E4M3) Green","pro":False}, + {"target":"Ambulatory (E4M3) Main","pro":False}]}, # Sepulcher (E4M4) {"name":"Sepulcher (E4M4) Main", @@ -767,9 +774,7 @@ class RegionDict(TypedDict, total=False): {"name":"Quay (E5M3) Blue", "connects_to_hub":False, "episode":5, - "connections":[ - {"target":"Quay (E5M3) Green","pro":False}, - {"target":"Quay (E5M3) Main","pro":False}]}, + "connections":[{"target":"Quay (E5M3) Main","pro":False}]}, {"name":"Quay (E5M3) Yellow", "connects_to_hub":False, "episode":5, @@ -779,7 +784,11 @@ class RegionDict(TypedDict, total=False): "episode":5, "connections":[ {"target":"Quay (E5M3) Main","pro":False}, - {"target":"Quay (E5M3) Blue","pro":False}]}, + {"target":"Quay (E5M3) Cyan","pro":False}]}, + {"name":"Quay (E5M3) Cyan", + "connects_to_hub":False, + "episode":5, + "connections":[{"target":"Quay (E5M3) Main","pro":False}]}, # Courtyard (E5M4) {"name":"Courtyard (E5M4) Main", diff --git a/worlds/heretic/Rules.py b/worlds/heretic/Rules.py index 7ef15d7920dd..579fd8b77179 100644 --- a/worlds/heretic/Rules.py +++ b/worlds/heretic/Rules.py @@ -7,185 +7,185 @@ from . import HereticWorld -def set_episode1_rules(player, world, pro): +def set_episode1_rules(player, multiworld, pro): # The Docks (E1M1) - set_rule(world.get_entrance("Hub -> The Docks (E1M1) Main", player), lambda state: + set_rule(multiworld.get_entrance("Hub -> The Docks (E1M1) Main", player), lambda state: state.has("The Docks (E1M1)", player, 1)) - set_rule(world.get_entrance("The Docks (E1M1) Main -> The Docks (E1M1) Yellow", player), lambda state: + set_rule(multiworld.get_entrance("The Docks (E1M1) Main -> The Docks (E1M1) Yellow", player), lambda state: state.has("The Docks (E1M1) - Yellow key", player, 1)) # The Dungeons (E1M2) - set_rule(world.get_entrance("Hub -> The Dungeons (E1M2) Main", player), lambda state: + set_rule(multiworld.get_entrance("Hub -> The Dungeons (E1M2) Main", player), lambda state: (state.has("The Dungeons (E1M2)", player, 1)) and (state.has("Dragon Claw", player, 1) or state.has("Ethereal Crossbow", player, 1))) - set_rule(world.get_entrance("The Dungeons (E1M2) Main -> The Dungeons (E1M2) Yellow", player), lambda state: + set_rule(multiworld.get_entrance("The Dungeons (E1M2) Main -> The Dungeons (E1M2) Yellow", player), lambda state: state.has("The Dungeons (E1M2) - Yellow key", player, 1)) - set_rule(world.get_entrance("The Dungeons (E1M2) Main -> The Dungeons (E1M2) Green", player), lambda state: + set_rule(multiworld.get_entrance("The Dungeons (E1M2) Main -> The Dungeons (E1M2) Green", player), lambda state: state.has("The Dungeons (E1M2) - Green key", player, 1)) - set_rule(world.get_entrance("The Dungeons (E1M2) Blue -> The Dungeons (E1M2) Yellow", player), lambda state: + set_rule(multiworld.get_entrance("The Dungeons (E1M2) Blue -> The Dungeons (E1M2) Yellow", player), lambda state: state.has("The Dungeons (E1M2) - Blue key", player, 1)) - set_rule(world.get_entrance("The Dungeons (E1M2) Yellow -> The Dungeons (E1M2) Blue", player), lambda state: + set_rule(multiworld.get_entrance("The Dungeons (E1M2) Yellow -> The Dungeons (E1M2) Blue", player), lambda state: state.has("The Dungeons (E1M2) - Blue key", player, 1)) # The Gatehouse (E1M3) - set_rule(world.get_entrance("Hub -> The Gatehouse (E1M3) Main", player), lambda state: + set_rule(multiworld.get_entrance("Hub -> The Gatehouse (E1M3) Main", player), lambda state: (state.has("The Gatehouse (E1M3)", player, 1)) and (state.has("Ethereal Crossbow", player, 1) or state.has("Dragon Claw", player, 1))) - set_rule(world.get_entrance("The Gatehouse (E1M3) Main -> The Gatehouse (E1M3) Yellow", player), lambda state: + set_rule(multiworld.get_entrance("The Gatehouse (E1M3) Main -> The Gatehouse (E1M3) Yellow", player), lambda state: state.has("The Gatehouse (E1M3) - Yellow key", player, 1)) - set_rule(world.get_entrance("The Gatehouse (E1M3) Main -> The Gatehouse (E1M3) Sea", player), lambda state: + set_rule(multiworld.get_entrance("The Gatehouse (E1M3) Main -> The Gatehouse (E1M3) Sea", player), lambda state: state.has("The Gatehouse (E1M3) - Yellow key", player, 1)) - set_rule(world.get_entrance("The Gatehouse (E1M3) Main -> The Gatehouse (E1M3) Green", player), lambda state: + set_rule(multiworld.get_entrance("The Gatehouse (E1M3) Main -> The Gatehouse (E1M3) Green", player), lambda state: state.has("The Gatehouse (E1M3) - Green key", player, 1)) - set_rule(world.get_entrance("The Gatehouse (E1M3) Green -> The Gatehouse (E1M3) Main", player), lambda state: + set_rule(multiworld.get_entrance("The Gatehouse (E1M3) Green -> The Gatehouse (E1M3) Main", player), lambda state: state.has("The Gatehouse (E1M3) - Green key", player, 1)) # The Guard Tower (E1M4) - set_rule(world.get_entrance("Hub -> The Guard Tower (E1M4) Main", player), lambda state: + set_rule(multiworld.get_entrance("Hub -> The Guard Tower (E1M4) Main", player), lambda state: (state.has("The Guard Tower (E1M4)", player, 1)) and (state.has("Ethereal Crossbow", player, 1) or state.has("Dragon Claw", player, 1))) - set_rule(world.get_entrance("The Guard Tower (E1M4) Main -> The Guard Tower (E1M4) Yellow", player), lambda state: + set_rule(multiworld.get_entrance("The Guard Tower (E1M4) Main -> The Guard Tower (E1M4) Yellow", player), lambda state: state.has("The Guard Tower (E1M4) - Yellow key", player, 1)) - set_rule(world.get_entrance("The Guard Tower (E1M4) Yellow -> The Guard Tower (E1M4) Green", player), lambda state: + set_rule(multiworld.get_entrance("The Guard Tower (E1M4) Yellow -> The Guard Tower (E1M4) Green", player), lambda state: state.has("The Guard Tower (E1M4) - Green key", player, 1)) - set_rule(world.get_entrance("The Guard Tower (E1M4) Green -> The Guard Tower (E1M4) Yellow", player), lambda state: + set_rule(multiworld.get_entrance("The Guard Tower (E1M4) Green -> The Guard Tower (E1M4) Yellow", player), lambda state: state.has("The Guard Tower (E1M4) - Green key", player, 1)) # The Citadel (E1M5) - set_rule(world.get_entrance("Hub -> The Citadel (E1M5) Main", player), lambda state: + set_rule(multiworld.get_entrance("Hub -> The Citadel (E1M5) Main", player), lambda state: (state.has("The Citadel (E1M5)", player, 1) and state.has("Ethereal Crossbow", player, 1)) and (state.has("Dragon Claw", player, 1) or state.has("Gauntlets of the Necromancer", player, 1))) - set_rule(world.get_entrance("The Citadel (E1M5) Main -> The Citadel (E1M5) Yellow", player), lambda state: + set_rule(multiworld.get_entrance("The Citadel (E1M5) Main -> The Citadel (E1M5) Yellow", player), lambda state: state.has("The Citadel (E1M5) - Yellow key", player, 1)) - set_rule(world.get_entrance("The Citadel (E1M5) Blue -> The Citadel (E1M5) Green", player), lambda state: + set_rule(multiworld.get_entrance("The Citadel (E1M5) Blue -> The Citadel (E1M5) Green", player), lambda state: state.has("The Citadel (E1M5) - Blue key", player, 1)) - set_rule(world.get_entrance("The Citadel (E1M5) Yellow -> The Citadel (E1M5) Green", player), lambda state: + set_rule(multiworld.get_entrance("The Citadel (E1M5) Yellow -> The Citadel (E1M5) Green", player), lambda state: state.has("The Citadel (E1M5) - Green key", player, 1)) - set_rule(world.get_entrance("The Citadel (E1M5) Green -> The Citadel (E1M5) Blue", player), lambda state: + set_rule(multiworld.get_entrance("The Citadel (E1M5) Green -> The Citadel (E1M5) Blue", player), lambda state: state.has("The Citadel (E1M5) - Blue key", player, 1)) # The Cathedral (E1M6) - set_rule(world.get_entrance("Hub -> The Cathedral (E1M6) Main", player), lambda state: + set_rule(multiworld.get_entrance("Hub -> The Cathedral (E1M6) Main", player), lambda state: (state.has("The Cathedral (E1M6)", player, 1) and state.has("Ethereal Crossbow", player, 1)) and (state.has("Gauntlets of the Necromancer", player, 1) or state.has("Dragon Claw", player, 1))) - set_rule(world.get_entrance("The Cathedral (E1M6) Main -> The Cathedral (E1M6) Yellow", player), lambda state: + set_rule(multiworld.get_entrance("The Cathedral (E1M6) Main -> The Cathedral (E1M6) Yellow", player), lambda state: state.has("The Cathedral (E1M6) - Yellow key", player, 1)) - set_rule(world.get_entrance("The Cathedral (E1M6) Yellow -> The Cathedral (E1M6) Green", player), lambda state: + set_rule(multiworld.get_entrance("The Cathedral (E1M6) Yellow -> The Cathedral (E1M6) Green", player), lambda state: state.has("The Cathedral (E1M6) - Green key", player, 1)) # The Crypts (E1M7) - set_rule(world.get_entrance("Hub -> The Crypts (E1M7) Main", player), lambda state: + set_rule(multiworld.get_entrance("Hub -> The Crypts (E1M7) Main", player), lambda state: (state.has("The Crypts (E1M7)", player, 1) and state.has("Ethereal Crossbow", player, 1)) and (state.has("Gauntlets of the Necromancer", player, 1) or state.has("Dragon Claw", player, 1))) - set_rule(world.get_entrance("The Crypts (E1M7) Main -> The Crypts (E1M7) Yellow", player), lambda state: + set_rule(multiworld.get_entrance("The Crypts (E1M7) Main -> The Crypts (E1M7) Yellow", player), lambda state: state.has("The Crypts (E1M7) - Yellow key", player, 1)) - set_rule(world.get_entrance("The Crypts (E1M7) Main -> The Crypts (E1M7) Green", player), lambda state: + set_rule(multiworld.get_entrance("The Crypts (E1M7) Main -> The Crypts (E1M7) Green", player), lambda state: state.has("The Crypts (E1M7) - Green key", player, 1)) - set_rule(world.get_entrance("The Crypts (E1M7) Yellow -> The Crypts (E1M7) Green", player), lambda state: + set_rule(multiworld.get_entrance("The Crypts (E1M7) Yellow -> The Crypts (E1M7) Green", player), lambda state: state.has("The Crypts (E1M7) - Green key", player, 1)) - set_rule(world.get_entrance("The Crypts (E1M7) Yellow -> The Crypts (E1M7) Blue", player), lambda state: + set_rule(multiworld.get_entrance("The Crypts (E1M7) Yellow -> The Crypts (E1M7) Blue", player), lambda state: state.has("The Crypts (E1M7) - Blue key", player, 1)) - set_rule(world.get_entrance("The Crypts (E1M7) Green -> The Crypts (E1M7) Main", player), lambda state: + set_rule(multiworld.get_entrance("The Crypts (E1M7) Green -> The Crypts (E1M7) Main", player), lambda state: state.has("The Crypts (E1M7) - Green key", player, 1)) # Hell's Maw (E1M8) - set_rule(world.get_entrance("Hub -> Hell's Maw (E1M8) Main", player), lambda state: + set_rule(multiworld.get_entrance("Hub -> Hell's Maw (E1M8) Main", player), lambda state: state.has("Hell's Maw (E1M8)", player, 1) and state.has("Gauntlets of the Necromancer", player, 1) and state.has("Ethereal Crossbow", player, 1) and state.has("Dragon Claw", player, 1)) # The Graveyard (E1M9) - set_rule(world.get_entrance("Hub -> The Graveyard (E1M9) Main", player), lambda state: + set_rule(multiworld.get_entrance("Hub -> The Graveyard (E1M9) Main", player), lambda state: state.has("The Graveyard (E1M9)", player, 1) and state.has("Gauntlets of the Necromancer", player, 1) and state.has("Ethereal Crossbow", player, 1) and state.has("Dragon Claw", player, 1)) - set_rule(world.get_entrance("The Graveyard (E1M9) Main -> The Graveyard (E1M9) Yellow", player), lambda state: + set_rule(multiworld.get_entrance("The Graveyard (E1M9) Main -> The Graveyard (E1M9) Yellow", player), lambda state: state.has("The Graveyard (E1M9) - Yellow key", player, 1)) - set_rule(world.get_entrance("The Graveyard (E1M9) Main -> The Graveyard (E1M9) Green", player), lambda state: + set_rule(multiworld.get_entrance("The Graveyard (E1M9) Main -> The Graveyard (E1M9) Green", player), lambda state: state.has("The Graveyard (E1M9) - Green key", player, 1)) - set_rule(world.get_entrance("The Graveyard (E1M9) Main -> The Graveyard (E1M9) Blue", player), lambda state: + set_rule(multiworld.get_entrance("The Graveyard (E1M9) Main -> The Graveyard (E1M9) Blue", player), lambda state: state.has("The Graveyard (E1M9) - Blue key", player, 1)) - set_rule(world.get_entrance("The Graveyard (E1M9) Yellow -> The Graveyard (E1M9) Main", player), lambda state: + set_rule(multiworld.get_entrance("The Graveyard (E1M9) Yellow -> The Graveyard (E1M9) Main", player), lambda state: state.has("The Graveyard (E1M9) - Yellow key", player, 1)) - set_rule(world.get_entrance("The Graveyard (E1M9) Green -> The Graveyard (E1M9) Main", player), lambda state: + set_rule(multiworld.get_entrance("The Graveyard (E1M9) Green -> The Graveyard (E1M9) Main", player), lambda state: state.has("The Graveyard (E1M9) - Green key", player, 1)) -def set_episode2_rules(player, world, pro): +def set_episode2_rules(player, multiworld, pro): # The Crater (E2M1) - set_rule(world.get_entrance("Hub -> The Crater (E2M1) Main", player), lambda state: + set_rule(multiworld.get_entrance("Hub -> The Crater (E2M1) Main", player), lambda state: state.has("The Crater (E2M1)", player, 1)) - set_rule(world.get_entrance("The Crater (E2M1) Main -> The Crater (E2M1) Yellow", player), lambda state: + set_rule(multiworld.get_entrance("The Crater (E2M1) Main -> The Crater (E2M1) Yellow", player), lambda state: state.has("The Crater (E2M1) - Yellow key", player, 1)) - set_rule(world.get_entrance("The Crater (E2M1) Yellow -> The Crater (E2M1) Green", player), lambda state: + set_rule(multiworld.get_entrance("The Crater (E2M1) Yellow -> The Crater (E2M1) Green", player), lambda state: state.has("The Crater (E2M1) - Green key", player, 1)) - set_rule(world.get_entrance("The Crater (E2M1) Green -> The Crater (E2M1) Yellow", player), lambda state: + set_rule(multiworld.get_entrance("The Crater (E2M1) Green -> The Crater (E2M1) Yellow", player), lambda state: state.has("The Crater (E2M1) - Green key", player, 1)) # The Lava Pits (E2M2) - set_rule(world.get_entrance("Hub -> The Lava Pits (E2M2) Main", player), lambda state: + set_rule(multiworld.get_entrance("Hub -> The Lava Pits (E2M2) Main", player), lambda state: (state.has("The Lava Pits (E2M2)", player, 1)) and (state.has("Ethereal Crossbow", player, 1) or state.has("Dragon Claw", player, 1))) - set_rule(world.get_entrance("The Lava Pits (E2M2) Main -> The Lava Pits (E2M2) Yellow", player), lambda state: + set_rule(multiworld.get_entrance("The Lava Pits (E2M2) Main -> The Lava Pits (E2M2) Yellow", player), lambda state: state.has("The Lava Pits (E2M2) - Yellow key", player, 1)) - set_rule(world.get_entrance("The Lava Pits (E2M2) Yellow -> The Lava Pits (E2M2) Green", player), lambda state: + set_rule(multiworld.get_entrance("The Lava Pits (E2M2) Yellow -> The Lava Pits (E2M2) Green", player), lambda state: state.has("The Lava Pits (E2M2) - Green key", player, 1)) - set_rule(world.get_entrance("The Lava Pits (E2M2) Yellow -> The Lava Pits (E2M2) Main", player), lambda state: + set_rule(multiworld.get_entrance("The Lava Pits (E2M2) Yellow -> The Lava Pits (E2M2) Main", player), lambda state: state.has("The Lava Pits (E2M2) - Yellow key", player, 1)) - set_rule(world.get_entrance("The Lava Pits (E2M2) Green -> The Lava Pits (E2M2) Yellow", player), lambda state: + set_rule(multiworld.get_entrance("The Lava Pits (E2M2) Green -> The Lava Pits (E2M2) Yellow", player), lambda state: state.has("The Lava Pits (E2M2) - Green key", player, 1)) # The River of Fire (E2M3) - set_rule(world.get_entrance("Hub -> The River of Fire (E2M3) Main", player), lambda state: + set_rule(multiworld.get_entrance("Hub -> The River of Fire (E2M3) Main", player), lambda state: state.has("The River of Fire (E2M3)", player, 1) and state.has("Dragon Claw", player, 1) and state.has("Ethereal Crossbow", player, 1)) - set_rule(world.get_entrance("The River of Fire (E2M3) Main -> The River of Fire (E2M3) Yellow", player), lambda state: + set_rule(multiworld.get_entrance("The River of Fire (E2M3) Main -> The River of Fire (E2M3) Yellow", player), lambda state: state.has("The River of Fire (E2M3) - Yellow key", player, 1)) - set_rule(world.get_entrance("The River of Fire (E2M3) Main -> The River of Fire (E2M3) Blue", player), lambda state: + set_rule(multiworld.get_entrance("The River of Fire (E2M3) Main -> The River of Fire (E2M3) Blue", player), lambda state: state.has("The River of Fire (E2M3) - Blue key", player, 1)) - set_rule(world.get_entrance("The River of Fire (E2M3) Main -> The River of Fire (E2M3) Green", player), lambda state: + set_rule(multiworld.get_entrance("The River of Fire (E2M3) Main -> The River of Fire (E2M3) Green", player), lambda state: state.has("The River of Fire (E2M3) - Green key", player, 1)) - set_rule(world.get_entrance("The River of Fire (E2M3) Blue -> The River of Fire (E2M3) Main", player), lambda state: + set_rule(multiworld.get_entrance("The River of Fire (E2M3) Blue -> The River of Fire (E2M3) Main", player), lambda state: state.has("The River of Fire (E2M3) - Blue key", player, 1)) - set_rule(world.get_entrance("The River of Fire (E2M3) Yellow -> The River of Fire (E2M3) Main", player), lambda state: + set_rule(multiworld.get_entrance("The River of Fire (E2M3) Yellow -> The River of Fire (E2M3) Main", player), lambda state: state.has("The River of Fire (E2M3) - Yellow key", player, 1)) - set_rule(world.get_entrance("The River of Fire (E2M3) Green -> The River of Fire (E2M3) Main", player), lambda state: + set_rule(multiworld.get_entrance("The River of Fire (E2M3) Green -> The River of Fire (E2M3) Main", player), lambda state: state.has("The River of Fire (E2M3) - Green key", player, 1)) # The Ice Grotto (E2M4) - set_rule(world.get_entrance("Hub -> The Ice Grotto (E2M4) Main", player), lambda state: + set_rule(multiworld.get_entrance("Hub -> The Ice Grotto (E2M4) Main", player), lambda state: (state.has("The Ice Grotto (E2M4)", player, 1) and state.has("Ethereal Crossbow", player, 1) and state.has("Dragon Claw", player, 1)) and (state.has("Hellstaff", player, 1) or state.has("Firemace", player, 1))) - set_rule(world.get_entrance("The Ice Grotto (E2M4) Main -> The Ice Grotto (E2M4) Green", player), lambda state: + set_rule(multiworld.get_entrance("The Ice Grotto (E2M4) Main -> The Ice Grotto (E2M4) Green", player), lambda state: state.has("The Ice Grotto (E2M4) - Green key", player, 1)) - set_rule(world.get_entrance("The Ice Grotto (E2M4) Main -> The Ice Grotto (E2M4) Yellow", player), lambda state: + set_rule(multiworld.get_entrance("The Ice Grotto (E2M4) Main -> The Ice Grotto (E2M4) Yellow", player), lambda state: state.has("The Ice Grotto (E2M4) - Yellow key", player, 1)) - set_rule(world.get_entrance("The Ice Grotto (E2M4) Blue -> The Ice Grotto (E2M4) Green", player), lambda state: + set_rule(multiworld.get_entrance("The Ice Grotto (E2M4) Blue -> The Ice Grotto (E2M4) Green", player), lambda state: state.has("The Ice Grotto (E2M4) - Blue key", player, 1)) - set_rule(world.get_entrance("The Ice Grotto (E2M4) Yellow -> The Ice Grotto (E2M4) Magenta", player), lambda state: + set_rule(multiworld.get_entrance("The Ice Grotto (E2M4) Yellow -> The Ice Grotto (E2M4) Magenta", player), lambda state: state.has("The Ice Grotto (E2M4) - Green key", player, 1) and state.has("The Ice Grotto (E2M4) - Blue key", player, 1)) - set_rule(world.get_entrance("The Ice Grotto (E2M4) Green -> The Ice Grotto (E2M4) Blue", player), lambda state: + set_rule(multiworld.get_entrance("The Ice Grotto (E2M4) Green -> The Ice Grotto (E2M4) Blue", player), lambda state: state.has("The Ice Grotto (E2M4) - Blue key", player, 1)) # The Catacombs (E2M5) - set_rule(world.get_entrance("Hub -> The Catacombs (E2M5) Main", player), lambda state: + set_rule(multiworld.get_entrance("Hub -> The Catacombs (E2M5) Main", player), lambda state: (state.has("The Catacombs (E2M5)", player, 1) and state.has("Gauntlets of the Necromancer", player, 1) and state.has("Ethereal Crossbow", player, 1) and @@ -193,17 +193,17 @@ def set_episode2_rules(player, world, pro): (state.has("Phoenix Rod", player, 1) or state.has("Firemace", player, 1) or state.has("Hellstaff", player, 1))) - set_rule(world.get_entrance("The Catacombs (E2M5) Main -> The Catacombs (E2M5) Yellow", player), lambda state: + set_rule(multiworld.get_entrance("The Catacombs (E2M5) Main -> The Catacombs (E2M5) Yellow", player), lambda state: state.has("The Catacombs (E2M5) - Yellow key", player, 1)) - set_rule(world.get_entrance("The Catacombs (E2M5) Blue -> The Catacombs (E2M5) Green", player), lambda state: + set_rule(multiworld.get_entrance("The Catacombs (E2M5) Blue -> The Catacombs (E2M5) Green", player), lambda state: state.has("The Catacombs (E2M5) - Blue key", player, 1)) - set_rule(world.get_entrance("The Catacombs (E2M5) Yellow -> The Catacombs (E2M5) Green", player), lambda state: - state.has("The Catacombs (E2M5) - Yellow key", player, 1)) - set_rule(world.get_entrance("The Catacombs (E2M5) Green -> The Catacombs (E2M5) Blue", player), lambda state: + set_rule(multiworld.get_entrance("The Catacombs (E2M5) Yellow -> The Catacombs (E2M5) Green", player), lambda state: + state.has("The Catacombs (E2M5) - Green key", player, 1)) + set_rule(multiworld.get_entrance("The Catacombs (E2M5) Green -> The Catacombs (E2M5) Blue", player), lambda state: state.has("The Catacombs (E2M5) - Blue key", player, 1)) # The Labyrinth (E2M6) - set_rule(world.get_entrance("Hub -> The Labyrinth (E2M6) Main", player), lambda state: + set_rule(multiworld.get_entrance("Hub -> The Labyrinth (E2M6) Main", player), lambda state: (state.has("The Labyrinth (E2M6)", player, 1) and state.has("Gauntlets of the Necromancer", player, 1) and state.has("Ethereal Crossbow", player, 1) and @@ -211,17 +211,17 @@ def set_episode2_rules(player, world, pro): (state.has("Phoenix Rod", player, 1) or state.has("Firemace", player, 1) or state.has("Hellstaff", player, 1))) - set_rule(world.get_entrance("The Labyrinth (E2M6) Main -> The Labyrinth (E2M6) Blue", player), lambda state: + set_rule(multiworld.get_entrance("The Labyrinth (E2M6) Main -> The Labyrinth (E2M6) Blue", player), lambda state: state.has("The Labyrinth (E2M6) - Blue key", player, 1)) - set_rule(world.get_entrance("The Labyrinth (E2M6) Main -> The Labyrinth (E2M6) Yellow", player), lambda state: + set_rule(multiworld.get_entrance("The Labyrinth (E2M6) Main -> The Labyrinth (E2M6) Yellow", player), lambda state: state.has("The Labyrinth (E2M6) - Yellow key", player, 1)) - set_rule(world.get_entrance("The Labyrinth (E2M6) Main -> The Labyrinth (E2M6) Green", player), lambda state: + set_rule(multiworld.get_entrance("The Labyrinth (E2M6) Main -> The Labyrinth (E2M6) Green", player), lambda state: state.has("The Labyrinth (E2M6) - Green key", player, 1)) - set_rule(world.get_entrance("The Labyrinth (E2M6) Blue -> The Labyrinth (E2M6) Main", player), lambda state: + set_rule(multiworld.get_entrance("The Labyrinth (E2M6) Blue -> The Labyrinth (E2M6) Main", player), lambda state: state.has("The Labyrinth (E2M6) - Blue key", player, 1)) # The Great Hall (E2M7) - set_rule(world.get_entrance("Hub -> The Great Hall (E2M7) Main", player), lambda state: + set_rule(multiworld.get_entrance("Hub -> The Great Hall (E2M7) Main", player), lambda state: (state.has("The Great Hall (E2M7)", player, 1) and state.has("Gauntlets of the Necromancer", player, 1) and state.has("Ethereal Crossbow", player, 1) and @@ -229,19 +229,19 @@ def set_episode2_rules(player, world, pro): state.has("Firemace", player, 1)) and (state.has("Phoenix Rod", player, 1) or state.has("Hellstaff", player, 1))) - set_rule(world.get_entrance("The Great Hall (E2M7) Main -> The Great Hall (E2M7) Yellow", player), lambda state: + set_rule(multiworld.get_entrance("The Great Hall (E2M7) Main -> The Great Hall (E2M7) Yellow", player), lambda state: state.has("The Great Hall (E2M7) - Yellow key", player, 1)) - set_rule(world.get_entrance("The Great Hall (E2M7) Main -> The Great Hall (E2M7) Green", player), lambda state: + set_rule(multiworld.get_entrance("The Great Hall (E2M7) Main -> The Great Hall (E2M7) Green", player), lambda state: state.has("The Great Hall (E2M7) - Green key", player, 1)) - set_rule(world.get_entrance("The Great Hall (E2M7) Blue -> The Great Hall (E2M7) Yellow", player), lambda state: + set_rule(multiworld.get_entrance("The Great Hall (E2M7) Blue -> The Great Hall (E2M7) Yellow", player), lambda state: state.has("The Great Hall (E2M7) - Blue key", player, 1)) - set_rule(world.get_entrance("The Great Hall (E2M7) Yellow -> The Great Hall (E2M7) Blue", player), lambda state: + set_rule(multiworld.get_entrance("The Great Hall (E2M7) Yellow -> The Great Hall (E2M7) Blue", player), lambda state: state.has("The Great Hall (E2M7) - Blue key", player, 1)) - set_rule(world.get_entrance("The Great Hall (E2M7) Yellow -> The Great Hall (E2M7) Main", player), lambda state: + set_rule(multiworld.get_entrance("The Great Hall (E2M7) Yellow -> The Great Hall (E2M7) Main", player), lambda state: state.has("The Great Hall (E2M7) - Yellow key", player, 1)) # The Portals of Chaos (E2M8) - set_rule(world.get_entrance("Hub -> The Portals of Chaos (E2M8) Main", player), lambda state: + set_rule(multiworld.get_entrance("Hub -> The Portals of Chaos (E2M8) Main", player), lambda state: state.has("The Portals of Chaos (E2M8)", player, 1) and state.has("Gauntlets of the Necromancer", player, 1) and state.has("Ethereal Crossbow", player, 1) and @@ -251,7 +251,7 @@ def set_episode2_rules(player, world, pro): state.has("Hellstaff", player, 1)) # The Glacier (E2M9) - set_rule(world.get_entrance("Hub -> The Glacier (E2M9) Main", player), lambda state: + set_rule(multiworld.get_entrance("Hub -> The Glacier (E2M9) Main", player), lambda state: (state.has("The Glacier (E2M9)", player, 1) and state.has("Gauntlets of the Necromancer", player, 1) and state.has("Ethereal Crossbow", player, 1) and @@ -259,51 +259,51 @@ def set_episode2_rules(player, world, pro): state.has("Firemace", player, 1)) and (state.has("Phoenix Rod", player, 1) or state.has("Hellstaff", player, 1))) - set_rule(world.get_entrance("The Glacier (E2M9) Main -> The Glacier (E2M9) Yellow", player), lambda state: + set_rule(multiworld.get_entrance("The Glacier (E2M9) Main -> The Glacier (E2M9) Yellow", player), lambda state: state.has("The Glacier (E2M9) - Yellow key", player, 1)) - set_rule(world.get_entrance("The Glacier (E2M9) Main -> The Glacier (E2M9) Blue", player), lambda state: + set_rule(multiworld.get_entrance("The Glacier (E2M9) Main -> The Glacier (E2M9) Blue", player), lambda state: state.has("The Glacier (E2M9) - Blue key", player, 1)) - set_rule(world.get_entrance("The Glacier (E2M9) Main -> The Glacier (E2M9) Green", player), lambda state: + set_rule(multiworld.get_entrance("The Glacier (E2M9) Main -> The Glacier (E2M9) Green", player), lambda state: state.has("The Glacier (E2M9) - Green key", player, 1)) - set_rule(world.get_entrance("The Glacier (E2M9) Blue -> The Glacier (E2M9) Main", player), lambda state: + set_rule(multiworld.get_entrance("The Glacier (E2M9) Blue -> The Glacier (E2M9) Main", player), lambda state: state.has("The Glacier (E2M9) - Blue key", player, 1)) - set_rule(world.get_entrance("The Glacier (E2M9) Yellow -> The Glacier (E2M9) Main", player), lambda state: + set_rule(multiworld.get_entrance("The Glacier (E2M9) Yellow -> The Glacier (E2M9) Main", player), lambda state: state.has("The Glacier (E2M9) - Yellow key", player, 1)) -def set_episode3_rules(player, world, pro): +def set_episode3_rules(player, multiworld, pro): # The Storehouse (E3M1) - set_rule(world.get_entrance("Hub -> The Storehouse (E3M1) Main", player), lambda state: + set_rule(multiworld.get_entrance("Hub -> The Storehouse (E3M1) Main", player), lambda state: state.has("The Storehouse (E3M1)", player, 1)) - set_rule(world.get_entrance("The Storehouse (E3M1) Main -> The Storehouse (E3M1) Yellow", player), lambda state: + set_rule(multiworld.get_entrance("The Storehouse (E3M1) Main -> The Storehouse (E3M1) Yellow", player), lambda state: state.has("The Storehouse (E3M1) - Yellow key", player, 1)) - set_rule(world.get_entrance("The Storehouse (E3M1) Main -> The Storehouse (E3M1) Green", player), lambda state: + set_rule(multiworld.get_entrance("The Storehouse (E3M1) Main -> The Storehouse (E3M1) Green", player), lambda state: state.has("The Storehouse (E3M1) - Green key", player, 1)) - set_rule(world.get_entrance("The Storehouse (E3M1) Yellow -> The Storehouse (E3M1) Main", player), lambda state: + set_rule(multiworld.get_entrance("The Storehouse (E3M1) Yellow -> The Storehouse (E3M1) Main", player), lambda state: state.has("The Storehouse (E3M1) - Yellow key", player, 1)) - set_rule(world.get_entrance("The Storehouse (E3M1) Green -> The Storehouse (E3M1) Main", player), lambda state: + set_rule(multiworld.get_entrance("The Storehouse (E3M1) Green -> The Storehouse (E3M1) Main", player), lambda state: state.has("The Storehouse (E3M1) - Green key", player, 1)) # The Cesspool (E3M2) - set_rule(world.get_entrance("Hub -> The Cesspool (E3M2) Main", player), lambda state: + set_rule(multiworld.get_entrance("Hub -> The Cesspool (E3M2) Main", player), lambda state: state.has("The Cesspool (E3M2)", player, 1) and state.has("Ethereal Crossbow", player, 1) and state.has("Dragon Claw", player, 1) and state.has("Firemace", player, 1) and state.has("Hellstaff", player, 1)) - set_rule(world.get_entrance("The Cesspool (E3M2) Main -> The Cesspool (E3M2) Yellow", player), lambda state: + set_rule(multiworld.get_entrance("The Cesspool (E3M2) Main -> The Cesspool (E3M2) Yellow", player), lambda state: state.has("The Cesspool (E3M2) - Yellow key", player, 1)) - set_rule(world.get_entrance("The Cesspool (E3M2) Blue -> The Cesspool (E3M2) Green", player), lambda state: + set_rule(multiworld.get_entrance("The Cesspool (E3M2) Blue -> The Cesspool (E3M2) Green", player), lambda state: state.has("The Cesspool (E3M2) - Blue key", player, 1)) - set_rule(world.get_entrance("The Cesspool (E3M2) Yellow -> The Cesspool (E3M2) Green", player), lambda state: + set_rule(multiworld.get_entrance("The Cesspool (E3M2) Yellow -> The Cesspool (E3M2) Green", player), lambda state: state.has("The Cesspool (E3M2) - Green key", player, 1)) - set_rule(world.get_entrance("The Cesspool (E3M2) Green -> The Cesspool (E3M2) Blue", player), lambda state: + set_rule(multiworld.get_entrance("The Cesspool (E3M2) Green -> The Cesspool (E3M2) Blue", player), lambda state: state.has("The Cesspool (E3M2) - Blue key", player, 1)) - set_rule(world.get_entrance("The Cesspool (E3M2) Green -> The Cesspool (E3M2) Yellow", player), lambda state: + set_rule(multiworld.get_entrance("The Cesspool (E3M2) Green -> The Cesspool (E3M2) Yellow", player), lambda state: state.has("The Cesspool (E3M2) - Green key", player, 1)) # The Confluence (E3M3) - set_rule(world.get_entrance("Hub -> The Confluence (E3M3) Main", player), lambda state: + set_rule(multiworld.get_entrance("Hub -> The Confluence (E3M3) Main", player), lambda state: (state.has("The Confluence (E3M3)", player, 1) and state.has("Ethereal Crossbow", player, 1) and state.has("Dragon Claw", player, 1)) and @@ -311,19 +311,19 @@ def set_episode3_rules(player, world, pro): state.has("Phoenix Rod", player, 1) or state.has("Firemace", player, 1) or state.has("Hellstaff", player, 1))) - set_rule(world.get_entrance("The Confluence (E3M3) Main -> The Confluence (E3M3) Green", player), lambda state: + set_rule(multiworld.get_entrance("The Confluence (E3M3) Main -> The Confluence (E3M3) Green", player), lambda state: state.has("The Confluence (E3M3) - Green key", player, 1)) - set_rule(world.get_entrance("The Confluence (E3M3) Main -> The Confluence (E3M3) Yellow", player), lambda state: + set_rule(multiworld.get_entrance("The Confluence (E3M3) Main -> The Confluence (E3M3) Yellow", player), lambda state: state.has("The Confluence (E3M3) - Yellow key", player, 1)) - set_rule(world.get_entrance("The Confluence (E3M3) Blue -> The Confluence (E3M3) Green", player), lambda state: + set_rule(multiworld.get_entrance("The Confluence (E3M3) Blue -> The Confluence (E3M3) Green", player), lambda state: state.has("The Confluence (E3M3) - Blue key", player, 1)) - set_rule(world.get_entrance("The Confluence (E3M3) Green -> The Confluence (E3M3) Main", player), lambda state: + set_rule(multiworld.get_entrance("The Confluence (E3M3) Green -> The Confluence (E3M3) Main", player), lambda state: state.has("The Confluence (E3M3) - Green key", player, 1)) - set_rule(world.get_entrance("The Confluence (E3M3) Green -> The Confluence (E3M3) Blue", player), lambda state: + set_rule(multiworld.get_entrance("The Confluence (E3M3) Green -> The Confluence (E3M3) Blue", player), lambda state: state.has("The Confluence (E3M3) - Blue key", player, 1)) # The Azure Fortress (E3M4) - set_rule(world.get_entrance("Hub -> The Azure Fortress (E3M4) Main", player), lambda state: + set_rule(multiworld.get_entrance("Hub -> The Azure Fortress (E3M4) Main", player), lambda state: (state.has("The Azure Fortress (E3M4)", player, 1) and state.has("Ethereal Crossbow", player, 1) and state.has("Dragon Claw", player, 1) and @@ -331,13 +331,13 @@ def set_episode3_rules(player, world, pro): (state.has("Firemace", player, 1) or state.has("Phoenix Rod", player, 1) or state.has("Gauntlets of the Necromancer", player, 1))) - set_rule(world.get_entrance("The Azure Fortress (E3M4) Main -> The Azure Fortress (E3M4) Green", player), lambda state: + set_rule(multiworld.get_entrance("The Azure Fortress (E3M4) Main -> The Azure Fortress (E3M4) Green", player), lambda state: state.has("The Azure Fortress (E3M4) - Green key", player, 1)) - set_rule(world.get_entrance("The Azure Fortress (E3M4) Main -> The Azure Fortress (E3M4) Yellow", player), lambda state: + set_rule(multiworld.get_entrance("The Azure Fortress (E3M4) Main -> The Azure Fortress (E3M4) Yellow", player), lambda state: state.has("The Azure Fortress (E3M4) - Yellow key", player, 1)) # The Ophidian Lair (E3M5) - set_rule(world.get_entrance("Hub -> The Ophidian Lair (E3M5) Main", player), lambda state: + set_rule(multiworld.get_entrance("Hub -> The Ophidian Lair (E3M5) Main", player), lambda state: (state.has("The Ophidian Lair (E3M5)", player, 1) and state.has("Ethereal Crossbow", player, 1) and state.has("Dragon Claw", player, 1) and @@ -345,13 +345,13 @@ def set_episode3_rules(player, world, pro): (state.has("Gauntlets of the Necromancer", player, 1) or state.has("Phoenix Rod", player, 1) or state.has("Firemace", player, 1))) - set_rule(world.get_entrance("The Ophidian Lair (E3M5) Main -> The Ophidian Lair (E3M5) Yellow", player), lambda state: + set_rule(multiworld.get_entrance("The Ophidian Lair (E3M5) Main -> The Ophidian Lair (E3M5) Yellow", player), lambda state: state.has("The Ophidian Lair (E3M5) - Yellow key", player, 1)) - set_rule(world.get_entrance("The Ophidian Lair (E3M5) Main -> The Ophidian Lair (E3M5) Green", player), lambda state: + set_rule(multiworld.get_entrance("The Ophidian Lair (E3M5) Main -> The Ophidian Lair (E3M5) Green", player), lambda state: state.has("The Ophidian Lair (E3M5) - Green key", player, 1)) # The Halls of Fear (E3M6) - set_rule(world.get_entrance("Hub -> The Halls of Fear (E3M6) Main", player), lambda state: + set_rule(multiworld.get_entrance("Hub -> The Halls of Fear (E3M6) Main", player), lambda state: (state.has("The Halls of Fear (E3M6)", player, 1) and state.has("Firemace", player, 1) and state.has("Hellstaff", player, 1) and @@ -359,17 +359,17 @@ def set_episode3_rules(player, world, pro): state.has("Ethereal Crossbow", player, 1)) and (state.has("Gauntlets of the Necromancer", player, 1) or state.has("Phoenix Rod", player, 1))) - set_rule(world.get_entrance("The Halls of Fear (E3M6) Main -> The Halls of Fear (E3M6) Yellow", player), lambda state: + set_rule(multiworld.get_entrance("The Halls of Fear (E3M6) Main -> The Halls of Fear (E3M6) Yellow", player), lambda state: state.has("The Halls of Fear (E3M6) - Yellow key", player, 1)) - set_rule(world.get_entrance("The Halls of Fear (E3M6) Blue -> The Halls of Fear (E3M6) Yellow", player), lambda state: + set_rule(multiworld.get_entrance("The Halls of Fear (E3M6) Blue -> The Halls of Fear (E3M6) Yellow", player), lambda state: state.has("The Halls of Fear (E3M6) - Blue key", player, 1)) - set_rule(world.get_entrance("The Halls of Fear (E3M6) Yellow -> The Halls of Fear (E3M6) Blue", player), lambda state: + set_rule(multiworld.get_entrance("The Halls of Fear (E3M6) Yellow -> The Halls of Fear (E3M6) Blue", player), lambda state: state.has("The Halls of Fear (E3M6) - Blue key", player, 1)) - set_rule(world.get_entrance("The Halls of Fear (E3M6) Yellow -> The Halls of Fear (E3M6) Green", player), lambda state: + set_rule(multiworld.get_entrance("The Halls of Fear (E3M6) Yellow -> The Halls of Fear (E3M6) Green", player), lambda state: state.has("The Halls of Fear (E3M6) - Green key", player, 1)) # The Chasm (E3M7) - set_rule(world.get_entrance("Hub -> The Chasm (E3M7) Main", player), lambda state: + set_rule(multiworld.get_entrance("Hub -> The Chasm (E3M7) Main", player), lambda state: (state.has("The Chasm (E3M7)", player, 1) and state.has("Ethereal Crossbow", player, 1) and state.has("Dragon Claw", player, 1) and @@ -377,19 +377,19 @@ def set_episode3_rules(player, world, pro): state.has("Hellstaff", player, 1)) and (state.has("Gauntlets of the Necromancer", player, 1) or state.has("Phoenix Rod", player, 1))) - set_rule(world.get_entrance("The Chasm (E3M7) Main -> The Chasm (E3M7) Yellow", player), lambda state: + set_rule(multiworld.get_entrance("The Chasm (E3M7) Main -> The Chasm (E3M7) Yellow", player), lambda state: state.has("The Chasm (E3M7) - Yellow key", player, 1)) - set_rule(world.get_entrance("The Chasm (E3M7) Yellow -> The Chasm (E3M7) Main", player), lambda state: + set_rule(multiworld.get_entrance("The Chasm (E3M7) Yellow -> The Chasm (E3M7) Main", player), lambda state: state.has("The Chasm (E3M7) - Yellow key", player, 1)) - set_rule(world.get_entrance("The Chasm (E3M7) Yellow -> The Chasm (E3M7) Green", player), lambda state: + set_rule(multiworld.get_entrance("The Chasm (E3M7) Yellow -> The Chasm (E3M7) Green", player), lambda state: state.has("The Chasm (E3M7) - Green key", player, 1)) - set_rule(world.get_entrance("The Chasm (E3M7) Yellow -> The Chasm (E3M7) Blue", player), lambda state: + set_rule(multiworld.get_entrance("The Chasm (E3M7) Yellow -> The Chasm (E3M7) Blue", player), lambda state: state.has("The Chasm (E3M7) - Blue key", player, 1)) - set_rule(world.get_entrance("The Chasm (E3M7) Green -> The Chasm (E3M7) Yellow", player), lambda state: + set_rule(multiworld.get_entrance("The Chasm (E3M7) Green -> The Chasm (E3M7) Yellow", player), lambda state: state.has("The Chasm (E3M7) - Green key", player, 1)) # D'Sparil'S Keep (E3M8) - set_rule(world.get_entrance("Hub -> D'Sparil'S Keep (E3M8) Main", player), lambda state: + set_rule(multiworld.get_entrance("Hub -> D'Sparil'S Keep (E3M8) Main", player), lambda state: state.has("D'Sparil'S Keep (E3M8)", player, 1) and state.has("Gauntlets of the Necromancer", player, 1) and state.has("Ethereal Crossbow", player, 1) and @@ -399,7 +399,7 @@ def set_episode3_rules(player, world, pro): state.has("Hellstaff", player, 1)) # The Aquifier (E3M9) - set_rule(world.get_entrance("Hub -> The Aquifier (E3M9) Main", player), lambda state: + set_rule(multiworld.get_entrance("Hub -> The Aquifier (E3M9) Main", player), lambda state: state.has("The Aquifier (E3M9)", player, 1) and state.has("Gauntlets of the Necromancer", player, 1) and state.has("Ethereal Crossbow", player, 1) and @@ -407,23 +407,23 @@ def set_episode3_rules(player, world, pro): state.has("Phoenix Rod", player, 1) and state.has("Firemace", player, 1) and state.has("Hellstaff", player, 1)) - set_rule(world.get_entrance("The Aquifier (E3M9) Main -> The Aquifier (E3M9) Yellow", player), lambda state: + set_rule(multiworld.get_entrance("The Aquifier (E3M9) Main -> The Aquifier (E3M9) Yellow", player), lambda state: state.has("The Aquifier (E3M9) - Yellow key", player, 1)) - set_rule(world.get_entrance("The Aquifier (E3M9) Yellow -> The Aquifier (E3M9) Green", player), lambda state: + set_rule(multiworld.get_entrance("The Aquifier (E3M9) Yellow -> The Aquifier (E3M9) Green", player), lambda state: state.has("The Aquifier (E3M9) - Green key", player, 1)) - set_rule(world.get_entrance("The Aquifier (E3M9) Yellow -> The Aquifier (E3M9) Main", player), lambda state: + set_rule(multiworld.get_entrance("The Aquifier (E3M9) Yellow -> The Aquifier (E3M9) Main", player), lambda state: state.has("The Aquifier (E3M9) - Yellow key", player, 1)) - set_rule(world.get_entrance("The Aquifier (E3M9) Green -> The Aquifier (E3M9) Yellow", player), lambda state: + set_rule(multiworld.get_entrance("The Aquifier (E3M9) Green -> The Aquifier (E3M9) Yellow", player), lambda state: state.has("The Aquifier (E3M9) - Green key", player, 1)) -def set_episode4_rules(player, world, pro): +def set_episode4_rules(player, multiworld, pro): # Catafalque (E4M1) - set_rule(world.get_entrance("Hub -> Catafalque (E4M1) Main", player), lambda state: + set_rule(multiworld.get_entrance("Hub -> Catafalque (E4M1) Main", player), lambda state: state.has("Catafalque (E4M1)", player, 1)) - set_rule(world.get_entrance("Catafalque (E4M1) Main -> Catafalque (E4M1) Yellow", player), lambda state: + set_rule(multiworld.get_entrance("Catafalque (E4M1) Main -> Catafalque (E4M1) Yellow", player), lambda state: state.has("Catafalque (E4M1) - Yellow key", player, 1)) - set_rule(world.get_entrance("Catafalque (E4M1) Yellow -> Catafalque (E4M1) Green", player), lambda state: + set_rule(multiworld.get_entrance("Catafalque (E4M1) Yellow -> Catafalque (E4M1) Green", player), lambda state: (state.has("Catafalque (E4M1) - Green key", player, 1)) and (state.has("Ethereal Crossbow", player, 1) or state.has("Dragon Claw", player, 1) or state.has("Phoenix Rod", player, 1) or @@ -431,23 +431,23 @@ def set_episode4_rules(player, world, pro): state.has("Hellstaff", player, 1))) # Blockhouse (E4M2) - set_rule(world.get_entrance("Hub -> Blockhouse (E4M2) Main", player), lambda state: + set_rule(multiworld.get_entrance("Hub -> Blockhouse (E4M2) Main", player), lambda state: state.has("Blockhouse (E4M2)", player, 1) and state.has("Ethereal Crossbow", player, 1) and state.has("Dragon Claw", player, 1)) - set_rule(world.get_entrance("Blockhouse (E4M2) Main -> Blockhouse (E4M2) Yellow", player), lambda state: + set_rule(multiworld.get_entrance("Blockhouse (E4M2) Main -> Blockhouse (E4M2) Yellow", player), lambda state: state.has("Blockhouse (E4M2) - Yellow key", player, 1)) - set_rule(world.get_entrance("Blockhouse (E4M2) Main -> Blockhouse (E4M2) Green", player), lambda state: + set_rule(multiworld.get_entrance("Blockhouse (E4M2) Main -> Blockhouse (E4M2) Green", player), lambda state: state.has("Blockhouse (E4M2) - Green key", player, 1)) - set_rule(world.get_entrance("Blockhouse (E4M2) Main -> Blockhouse (E4M2) Blue", player), lambda state: + set_rule(multiworld.get_entrance("Blockhouse (E4M2) Main -> Blockhouse (E4M2) Blue", player), lambda state: state.has("Blockhouse (E4M2) - Blue key", player, 1)) - set_rule(world.get_entrance("Blockhouse (E4M2) Green -> Blockhouse (E4M2) Main", player), lambda state: + set_rule(multiworld.get_entrance("Blockhouse (E4M2) Green -> Blockhouse (E4M2) Main", player), lambda state: state.has("Blockhouse (E4M2) - Green key", player, 1)) - set_rule(world.get_entrance("Blockhouse (E4M2) Blue -> Blockhouse (E4M2) Main", player), lambda state: + set_rule(multiworld.get_entrance("Blockhouse (E4M2) Blue -> Blockhouse (E4M2) Main", player), lambda state: state.has("Blockhouse (E4M2) - Blue key", player, 1)) # Ambulatory (E4M3) - set_rule(world.get_entrance("Hub -> Ambulatory (E4M3) Main", player), lambda state: + set_rule(multiworld.get_entrance("Hub -> Ambulatory (E4M3) Main", player), lambda state: (state.has("Ambulatory (E4M3)", player, 1) and state.has("Ethereal Crossbow", player, 1) and state.has("Dragon Claw", player, 1) and @@ -455,15 +455,17 @@ def set_episode4_rules(player, world, pro): (state.has("Phoenix Rod", player, 1) or state.has("Firemace", player, 1) or state.has("Hellstaff", player, 1))) - set_rule(world.get_entrance("Ambulatory (E4M3) Main -> Ambulatory (E4M3) Blue", player), lambda state: + set_rule(multiworld.get_entrance("Ambulatory (E4M3) Main -> Ambulatory (E4M3) Blue", player), lambda state: state.has("Ambulatory (E4M3) - Blue key", player, 1)) - set_rule(world.get_entrance("Ambulatory (E4M3) Main -> Ambulatory (E4M3) Yellow", player), lambda state: + set_rule(multiworld.get_entrance("Ambulatory (E4M3) Main -> Ambulatory (E4M3) Yellow", player), lambda state: state.has("Ambulatory (E4M3) - Yellow key", player, 1)) - set_rule(world.get_entrance("Ambulatory (E4M3) Main -> Ambulatory (E4M3) Green", player), lambda state: + set_rule(multiworld.get_entrance("Ambulatory (E4M3) Main -> Ambulatory (E4M3) Green", player), lambda state: + state.has("Ambulatory (E4M3) - Green key", player, 1)) + set_rule(multiworld.get_entrance("Ambulatory (E4M3) Main -> Ambulatory (E4M3) Green Lock", player), lambda state: state.has("Ambulatory (E4M3) - Green key", player, 1)) # Sepulcher (E4M4) - set_rule(world.get_entrance("Hub -> Sepulcher (E4M4) Main", player), lambda state: + set_rule(multiworld.get_entrance("Hub -> Sepulcher (E4M4) Main", player), lambda state: (state.has("Sepulcher (E4M4)", player, 1) and state.has("Ethereal Crossbow", player, 1) and state.has("Dragon Claw", player, 1) and @@ -473,7 +475,7 @@ def set_episode4_rules(player, world, pro): state.has("Hellstaff", player, 1))) # Great Stair (E4M5) - set_rule(world.get_entrance("Hub -> Great Stair (E4M5) Main", player), lambda state: + set_rule(multiworld.get_entrance("Hub -> Great Stair (E4M5) Main", player), lambda state: (state.has("Great Stair (E4M5)", player, 1) and state.has("Gauntlets of the Necromancer", player, 1) and state.has("Ethereal Crossbow", player, 1) and @@ -481,19 +483,19 @@ def set_episode4_rules(player, world, pro): state.has("Firemace", player, 1)) and (state.has("Hellstaff", player, 1) or state.has("Phoenix Rod", player, 1))) - set_rule(world.get_entrance("Great Stair (E4M5) Main -> Great Stair (E4M5) Yellow", player), lambda state: + set_rule(multiworld.get_entrance("Great Stair (E4M5) Main -> Great Stair (E4M5) Yellow", player), lambda state: state.has("Great Stair (E4M5) - Yellow key", player, 1)) - set_rule(world.get_entrance("Great Stair (E4M5) Blue -> Great Stair (E4M5) Green", player), lambda state: + set_rule(multiworld.get_entrance("Great Stair (E4M5) Blue -> Great Stair (E4M5) Green", player), lambda state: state.has("Great Stair (E4M5) - Blue key", player, 1)) - set_rule(world.get_entrance("Great Stair (E4M5) Yellow -> Great Stair (E4M5) Green", player), lambda state: + set_rule(multiworld.get_entrance("Great Stair (E4M5) Yellow -> Great Stair (E4M5) Green", player), lambda state: state.has("Great Stair (E4M5) - Green key", player, 1)) - set_rule(world.get_entrance("Great Stair (E4M5) Green -> Great Stair (E4M5) Blue", player), lambda state: + set_rule(multiworld.get_entrance("Great Stair (E4M5) Green -> Great Stair (E4M5) Blue", player), lambda state: state.has("Great Stair (E4M5) - Blue key", player, 1)) - set_rule(world.get_entrance("Great Stair (E4M5) Green -> Great Stair (E4M5) Yellow", player), lambda state: + set_rule(multiworld.get_entrance("Great Stair (E4M5) Green -> Great Stair (E4M5) Yellow", player), lambda state: state.has("Great Stair (E4M5) - Green key", player, 1)) # Halls of the Apostate (E4M6) - set_rule(world.get_entrance("Hub -> Halls of the Apostate (E4M6) Main", player), lambda state: + set_rule(multiworld.get_entrance("Hub -> Halls of the Apostate (E4M6) Main", player), lambda state: (state.has("Halls of the Apostate (E4M6)", player, 1) and state.has("Gauntlets of the Necromancer", player, 1) and state.has("Ethereal Crossbow", player, 1) and @@ -501,19 +503,19 @@ def set_episode4_rules(player, world, pro): state.has("Firemace", player, 1)) and (state.has("Phoenix Rod", player, 1) or state.has("Hellstaff", player, 1))) - set_rule(world.get_entrance("Halls of the Apostate (E4M6) Main -> Halls of the Apostate (E4M6) Yellow", player), lambda state: + set_rule(multiworld.get_entrance("Halls of the Apostate (E4M6) Main -> Halls of the Apostate (E4M6) Yellow", player), lambda state: state.has("Halls of the Apostate (E4M6) - Yellow key", player, 1)) - set_rule(world.get_entrance("Halls of the Apostate (E4M6) Blue -> Halls of the Apostate (E4M6) Green", player), lambda state: + set_rule(multiworld.get_entrance("Halls of the Apostate (E4M6) Blue -> Halls of the Apostate (E4M6) Green", player), lambda state: state.has("Halls of the Apostate (E4M6) - Blue key", player, 1)) - set_rule(world.get_entrance("Halls of the Apostate (E4M6) Yellow -> Halls of the Apostate (E4M6) Green", player), lambda state: + set_rule(multiworld.get_entrance("Halls of the Apostate (E4M6) Yellow -> Halls of the Apostate (E4M6) Green", player), lambda state: state.has("Halls of the Apostate (E4M6) - Green key", player, 1)) - set_rule(world.get_entrance("Halls of the Apostate (E4M6) Green -> Halls of the Apostate (E4M6) Yellow", player), lambda state: + set_rule(multiworld.get_entrance("Halls of the Apostate (E4M6) Green -> Halls of the Apostate (E4M6) Yellow", player), lambda state: state.has("Halls of the Apostate (E4M6) - Green key", player, 1)) - set_rule(world.get_entrance("Halls of the Apostate (E4M6) Green -> Halls of the Apostate (E4M6) Blue", player), lambda state: + set_rule(multiworld.get_entrance("Halls of the Apostate (E4M6) Green -> Halls of the Apostate (E4M6) Blue", player), lambda state: state.has("Halls of the Apostate (E4M6) - Blue key", player, 1)) # Ramparts of Perdition (E4M7) - set_rule(world.get_entrance("Hub -> Ramparts of Perdition (E4M7) Main", player), lambda state: + set_rule(multiworld.get_entrance("Hub -> Ramparts of Perdition (E4M7) Main", player), lambda state: (state.has("Ramparts of Perdition (E4M7)", player, 1) and state.has("Gauntlets of the Necromancer", player, 1) and state.has("Ethereal Crossbow", player, 1) and @@ -521,21 +523,21 @@ def set_episode4_rules(player, world, pro): state.has("Firemace", player, 1)) and (state.has("Phoenix Rod", player, 1) or state.has("Hellstaff", player, 1))) - set_rule(world.get_entrance("Ramparts of Perdition (E4M7) Main -> Ramparts of Perdition (E4M7) Yellow", player), lambda state: + set_rule(multiworld.get_entrance("Ramparts of Perdition (E4M7) Main -> Ramparts of Perdition (E4M7) Yellow", player), lambda state: state.has("Ramparts of Perdition (E4M7) - Yellow key", player, 1)) - set_rule(world.get_entrance("Ramparts of Perdition (E4M7) Blue -> Ramparts of Perdition (E4M7) Yellow", player), lambda state: + set_rule(multiworld.get_entrance("Ramparts of Perdition (E4M7) Blue -> Ramparts of Perdition (E4M7) Yellow", player), lambda state: state.has("Ramparts of Perdition (E4M7) - Blue key", player, 1)) - set_rule(world.get_entrance("Ramparts of Perdition (E4M7) Yellow -> Ramparts of Perdition (E4M7) Main", player), lambda state: + set_rule(multiworld.get_entrance("Ramparts of Perdition (E4M7) Yellow -> Ramparts of Perdition (E4M7) Main", player), lambda state: state.has("Ramparts of Perdition (E4M7) - Yellow key", player, 1)) - set_rule(world.get_entrance("Ramparts of Perdition (E4M7) Yellow -> Ramparts of Perdition (E4M7) Green", player), lambda state: + set_rule(multiworld.get_entrance("Ramparts of Perdition (E4M7) Yellow -> Ramparts of Perdition (E4M7) Green", player), lambda state: state.has("Ramparts of Perdition (E4M7) - Green key", player, 1)) - set_rule(world.get_entrance("Ramparts of Perdition (E4M7) Yellow -> Ramparts of Perdition (E4M7) Blue", player), lambda state: + set_rule(multiworld.get_entrance("Ramparts of Perdition (E4M7) Yellow -> Ramparts of Perdition (E4M7) Blue", player), lambda state: state.has("Ramparts of Perdition (E4M7) - Blue key", player, 1)) - set_rule(world.get_entrance("Ramparts of Perdition (E4M7) Green -> Ramparts of Perdition (E4M7) Yellow", player), lambda state: + set_rule(multiworld.get_entrance("Ramparts of Perdition (E4M7) Green -> Ramparts of Perdition (E4M7) Yellow", player), lambda state: state.has("Ramparts of Perdition (E4M7) - Green key", player, 1)) # Shattered Bridge (E4M8) - set_rule(world.get_entrance("Hub -> Shattered Bridge (E4M8) Main", player), lambda state: + set_rule(multiworld.get_entrance("Hub -> Shattered Bridge (E4M8) Main", player), lambda state: state.has("Shattered Bridge (E4M8)", player, 1) and state.has("Gauntlets of the Necromancer", player, 1) and state.has("Ethereal Crossbow", player, 1) and @@ -543,13 +545,13 @@ def set_episode4_rules(player, world, pro): state.has("Phoenix Rod", player, 1) and state.has("Firemace", player, 1) and state.has("Hellstaff", player, 1)) - set_rule(world.get_entrance("Shattered Bridge (E4M8) Main -> Shattered Bridge (E4M8) Yellow", player), lambda state: + set_rule(multiworld.get_entrance("Shattered Bridge (E4M8) Main -> Shattered Bridge (E4M8) Yellow", player), lambda state: state.has("Shattered Bridge (E4M8) - Yellow key", player, 1)) - set_rule(world.get_entrance("Shattered Bridge (E4M8) Yellow -> Shattered Bridge (E4M8) Main", player), lambda state: + set_rule(multiworld.get_entrance("Shattered Bridge (E4M8) Yellow -> Shattered Bridge (E4M8) Main", player), lambda state: state.has("Shattered Bridge (E4M8) - Yellow key", player, 1)) # Mausoleum (E4M9) - set_rule(world.get_entrance("Hub -> Mausoleum (E4M9) Main", player), lambda state: + set_rule(multiworld.get_entrance("Hub -> Mausoleum (E4M9) Main", player), lambda state: (state.has("Mausoleum (E4M9)", player, 1) and state.has("Gauntlets of the Necromancer", player, 1) and state.has("Ethereal Crossbow", player, 1) and @@ -557,102 +559,100 @@ def set_episode4_rules(player, world, pro): state.has("Firemace", player, 1)) and (state.has("Phoenix Rod", player, 1) or state.has("Hellstaff", player, 1))) - set_rule(world.get_entrance("Mausoleum (E4M9) Main -> Mausoleum (E4M9) Yellow", player), lambda state: + set_rule(multiworld.get_entrance("Mausoleum (E4M9) Main -> Mausoleum (E4M9) Yellow", player), lambda state: state.has("Mausoleum (E4M9) - Yellow key", player, 1)) - set_rule(world.get_entrance("Mausoleum (E4M9) Yellow -> Mausoleum (E4M9) Main", player), lambda state: + set_rule(multiworld.get_entrance("Mausoleum (E4M9) Yellow -> Mausoleum (E4M9) Main", player), lambda state: state.has("Mausoleum (E4M9) - Yellow key", player, 1)) -def set_episode5_rules(player, world, pro): +def set_episode5_rules(player, multiworld, pro): # Ochre Cliffs (E5M1) - set_rule(world.get_entrance("Hub -> Ochre Cliffs (E5M1) Main", player), lambda state: + set_rule(multiworld.get_entrance("Hub -> Ochre Cliffs (E5M1) Main", player), lambda state: state.has("Ochre Cliffs (E5M1)", player, 1)) - set_rule(world.get_entrance("Ochre Cliffs (E5M1) Main -> Ochre Cliffs (E5M1) Yellow", player), lambda state: + set_rule(multiworld.get_entrance("Ochre Cliffs (E5M1) Main -> Ochre Cliffs (E5M1) Yellow", player), lambda state: state.has("Ochre Cliffs (E5M1) - Yellow key", player, 1)) - set_rule(world.get_entrance("Ochre Cliffs (E5M1) Blue -> Ochre Cliffs (E5M1) Yellow", player), lambda state: + set_rule(multiworld.get_entrance("Ochre Cliffs (E5M1) Blue -> Ochre Cliffs (E5M1) Yellow", player), lambda state: state.has("Ochre Cliffs (E5M1) - Blue key", player, 1)) - set_rule(world.get_entrance("Ochre Cliffs (E5M1) Yellow -> Ochre Cliffs (E5M1) Main", player), lambda state: + set_rule(multiworld.get_entrance("Ochre Cliffs (E5M1) Yellow -> Ochre Cliffs (E5M1) Main", player), lambda state: state.has("Ochre Cliffs (E5M1) - Yellow key", player, 1)) - set_rule(world.get_entrance("Ochre Cliffs (E5M1) Yellow -> Ochre Cliffs (E5M1) Green", player), lambda state: + set_rule(multiworld.get_entrance("Ochre Cliffs (E5M1) Yellow -> Ochre Cliffs (E5M1) Green", player), lambda state: state.has("Ochre Cliffs (E5M1) - Green key", player, 1)) - set_rule(world.get_entrance("Ochre Cliffs (E5M1) Yellow -> Ochre Cliffs (E5M1) Blue", player), lambda state: + set_rule(multiworld.get_entrance("Ochre Cliffs (E5M1) Yellow -> Ochre Cliffs (E5M1) Blue", player), lambda state: state.has("Ochre Cliffs (E5M1) - Blue key", player, 1)) - set_rule(world.get_entrance("Ochre Cliffs (E5M1) Green -> Ochre Cliffs (E5M1) Yellow", player), lambda state: + set_rule(multiworld.get_entrance("Ochre Cliffs (E5M1) Green -> Ochre Cliffs (E5M1) Yellow", player), lambda state: state.has("Ochre Cliffs (E5M1) - Green key", player, 1)) # Rapids (E5M2) - set_rule(world.get_entrance("Hub -> Rapids (E5M2) Main", player), lambda state: + set_rule(multiworld.get_entrance("Hub -> Rapids (E5M2) Main", player), lambda state: state.has("Rapids (E5M2)", player, 1) and state.has("Ethereal Crossbow", player, 1) and state.has("Dragon Claw", player, 1)) - set_rule(world.get_entrance("Rapids (E5M2) Main -> Rapids (E5M2) Yellow", player), lambda state: + set_rule(multiworld.get_entrance("Rapids (E5M2) Main -> Rapids (E5M2) Yellow", player), lambda state: state.has("Rapids (E5M2) - Yellow key", player, 1)) - set_rule(world.get_entrance("Rapids (E5M2) Yellow -> Rapids (E5M2) Main", player), lambda state: + set_rule(multiworld.get_entrance("Rapids (E5M2) Yellow -> Rapids (E5M2) Main", player), lambda state: state.has("Rapids (E5M2) - Yellow key", player, 1)) - set_rule(world.get_entrance("Rapids (E5M2) Yellow -> Rapids (E5M2) Green", player), lambda state: + set_rule(multiworld.get_entrance("Rapids (E5M2) Yellow -> Rapids (E5M2) Green", player), lambda state: state.has("Rapids (E5M2) - Green key", player, 1)) # Quay (E5M3) - set_rule(world.get_entrance("Hub -> Quay (E5M3) Main", player), lambda state: + set_rule(multiworld.get_entrance("Hub -> Quay (E5M3) Main", player), lambda state: (state.has("Quay (E5M3)", player, 1) and state.has("Ethereal Crossbow", player, 1) and state.has("Dragon Claw", player, 1)) and (state.has("Phoenix Rod", player, 1) or state.has("Hellstaff", player, 1) or state.has("Firemace", player, 1))) - set_rule(world.get_entrance("Quay (E5M3) Main -> Quay (E5M3) Yellow", player), lambda state: + set_rule(multiworld.get_entrance("Quay (E5M3) Main -> Quay (E5M3) Yellow", player), lambda state: state.has("Quay (E5M3) - Yellow key", player, 1)) - set_rule(world.get_entrance("Quay (E5M3) Main -> Quay (E5M3) Green", player), lambda state: + set_rule(multiworld.get_entrance("Quay (E5M3) Main -> Quay (E5M3) Green", player), lambda state: state.has("Quay (E5M3) - Green key", player, 1)) - set_rule(world.get_entrance("Quay (E5M3) Main -> Quay (E5M3) Blue", player), lambda state: - state.has("Quay (E5M3) - Blue key", player, 1)) - set_rule(world.get_entrance("Quay (E5M3) Blue -> Quay (E5M3) Green", player), lambda state: + set_rule(multiworld.get_entrance("Quay (E5M3) Main -> Quay (E5M3) Blue", player), lambda state: state.has("Quay (E5M3) - Blue key", player, 1)) - set_rule(world.get_entrance("Quay (E5M3) Yellow -> Quay (E5M3) Main", player), lambda state: + set_rule(multiworld.get_entrance("Quay (E5M3) Yellow -> Quay (E5M3) Main", player), lambda state: state.has("Quay (E5M3) - Yellow key", player, 1)) - set_rule(world.get_entrance("Quay (E5M3) Green -> Quay (E5M3) Main", player), lambda state: + set_rule(multiworld.get_entrance("Quay (E5M3) Green -> Quay (E5M3) Main", player), lambda state: state.has("Quay (E5M3) - Green key", player, 1)) - set_rule(world.get_entrance("Quay (E5M3) Green -> Quay (E5M3) Blue", player), lambda state: + set_rule(multiworld.get_entrance("Quay (E5M3) Green -> Quay (E5M3) Cyan", player), lambda state: state.has("Quay (E5M3) - Blue key", player, 1)) # Courtyard (E5M4) - set_rule(world.get_entrance("Hub -> Courtyard (E5M4) Main", player), lambda state: + set_rule(multiworld.get_entrance("Hub -> Courtyard (E5M4) Main", player), lambda state: (state.has("Courtyard (E5M4)", player, 1) and state.has("Ethereal Crossbow", player, 1) and state.has("Dragon Claw", player, 1)) and (state.has("Phoenix Rod", player, 1) or state.has("Firemace", player, 1) or state.has("Hellstaff", player, 1))) - set_rule(world.get_entrance("Courtyard (E5M4) Main -> Courtyard (E5M4) Kakis", player), lambda state: + set_rule(multiworld.get_entrance("Courtyard (E5M4) Main -> Courtyard (E5M4) Kakis", player), lambda state: state.has("Courtyard (E5M4) - Yellow key", player, 1) or state.has("Courtyard (E5M4) - Green key", player, 1)) - set_rule(world.get_entrance("Courtyard (E5M4) Main -> Courtyard (E5M4) Blue", player), lambda state: + set_rule(multiworld.get_entrance("Courtyard (E5M4) Main -> Courtyard (E5M4) Blue", player), lambda state: state.has("Courtyard (E5M4) - Blue key", player, 1)) - set_rule(world.get_entrance("Courtyard (E5M4) Blue -> Courtyard (E5M4) Main", player), lambda state: + set_rule(multiworld.get_entrance("Courtyard (E5M4) Blue -> Courtyard (E5M4) Main", player), lambda state: state.has("Courtyard (E5M4) - Blue key", player, 1)) - set_rule(world.get_entrance("Courtyard (E5M4) Kakis -> Courtyard (E5M4) Main", player), lambda state: + set_rule(multiworld.get_entrance("Courtyard (E5M4) Kakis -> Courtyard (E5M4) Main", player), lambda state: state.has("Courtyard (E5M4) - Yellow key", player, 1) or state.has("Courtyard (E5M4) - Green key", player, 1)) # Hydratyr (E5M5) - set_rule(world.get_entrance("Hub -> Hydratyr (E5M5) Main", player), lambda state: + set_rule(multiworld.get_entrance("Hub -> Hydratyr (E5M5) Main", player), lambda state: (state.has("Hydratyr (E5M5)", player, 1) and state.has("Ethereal Crossbow", player, 1) and state.has("Dragon Claw", player, 1) and state.has("Firemace", player, 1)) and (state.has("Phoenix Rod", player, 1) or state.has("Hellstaff", player, 1))) - set_rule(world.get_entrance("Hydratyr (E5M5) Main -> Hydratyr (E5M5) Yellow", player), lambda state: + set_rule(multiworld.get_entrance("Hydratyr (E5M5) Main -> Hydratyr (E5M5) Yellow", player), lambda state: state.has("Hydratyr (E5M5) - Yellow key", player, 1)) - set_rule(world.get_entrance("Hydratyr (E5M5) Blue -> Hydratyr (E5M5) Green", player), lambda state: + set_rule(multiworld.get_entrance("Hydratyr (E5M5) Blue -> Hydratyr (E5M5) Green", player), lambda state: state.has("Hydratyr (E5M5) - Blue key", player, 1)) - set_rule(world.get_entrance("Hydratyr (E5M5) Yellow -> Hydratyr (E5M5) Green", player), lambda state: + set_rule(multiworld.get_entrance("Hydratyr (E5M5) Yellow -> Hydratyr (E5M5) Green", player), lambda state: state.has("Hydratyr (E5M5) - Green key", player, 1)) - set_rule(world.get_entrance("Hydratyr (E5M5) Green -> Hydratyr (E5M5) Blue", player), lambda state: + set_rule(multiworld.get_entrance("Hydratyr (E5M5) Green -> Hydratyr (E5M5) Blue", player), lambda state: state.has("Hydratyr (E5M5) - Blue key", player, 1)) # Colonnade (E5M6) - set_rule(world.get_entrance("Hub -> Colonnade (E5M6) Main", player), lambda state: + set_rule(multiworld.get_entrance("Hub -> Colonnade (E5M6) Main", player), lambda state: (state.has("Colonnade (E5M6)", player, 1) and state.has("Ethereal Crossbow", player, 1) and state.has("Dragon Claw", player, 1) and @@ -660,19 +660,19 @@ def set_episode5_rules(player, world, pro): state.has("Gauntlets of the Necromancer", player, 1)) and (state.has("Phoenix Rod", player, 1) or state.has("Hellstaff", player, 1))) - set_rule(world.get_entrance("Colonnade (E5M6) Main -> Colonnade (E5M6) Yellow", player), lambda state: + set_rule(multiworld.get_entrance("Colonnade (E5M6) Main -> Colonnade (E5M6) Yellow", player), lambda state: state.has("Colonnade (E5M6) - Yellow key", player, 1)) - set_rule(world.get_entrance("Colonnade (E5M6) Main -> Colonnade (E5M6) Blue", player), lambda state: + set_rule(multiworld.get_entrance("Colonnade (E5M6) Main -> Colonnade (E5M6) Blue", player), lambda state: state.has("Colonnade (E5M6) - Blue key", player, 1)) - set_rule(world.get_entrance("Colonnade (E5M6) Blue -> Colonnade (E5M6) Main", player), lambda state: + set_rule(multiworld.get_entrance("Colonnade (E5M6) Blue -> Colonnade (E5M6) Main", player), lambda state: state.has("Colonnade (E5M6) - Blue key", player, 1)) - set_rule(world.get_entrance("Colonnade (E5M6) Yellow -> Colonnade (E5M6) Green", player), lambda state: + set_rule(multiworld.get_entrance("Colonnade (E5M6) Yellow -> Colonnade (E5M6) Green", player), lambda state: state.has("Colonnade (E5M6) - Green key", player, 1)) - set_rule(world.get_entrance("Colonnade (E5M6) Green -> Colonnade (E5M6) Yellow", player), lambda state: + set_rule(multiworld.get_entrance("Colonnade (E5M6) Green -> Colonnade (E5M6) Yellow", player), lambda state: state.has("Colonnade (E5M6) - Green key", player, 1)) # Foetid Manse (E5M7) - set_rule(world.get_entrance("Hub -> Foetid Manse (E5M7) Main", player), lambda state: + set_rule(multiworld.get_entrance("Hub -> Foetid Manse (E5M7) Main", player), lambda state: (state.has("Foetid Manse (E5M7)", player, 1) and state.has("Ethereal Crossbow", player, 1) and state.has("Dragon Claw", player, 1) and @@ -680,15 +680,15 @@ def set_episode5_rules(player, world, pro): state.has("Gauntlets of the Necromancer", player, 1)) and (state.has("Phoenix Rod", player, 1) or state.has("Hellstaff", player, 1))) - set_rule(world.get_entrance("Foetid Manse (E5M7) Main -> Foetid Manse (E5M7) Yellow", player), lambda state: + set_rule(multiworld.get_entrance("Foetid Manse (E5M7) Main -> Foetid Manse (E5M7) Yellow", player), lambda state: state.has("Foetid Manse (E5M7) - Yellow key", player, 1)) - set_rule(world.get_entrance("Foetid Manse (E5M7) Yellow -> Foetid Manse (E5M7) Green", player), lambda state: + set_rule(multiworld.get_entrance("Foetid Manse (E5M7) Yellow -> Foetid Manse (E5M7) Green", player), lambda state: state.has("Foetid Manse (E5M7) - Green key", player, 1)) - set_rule(world.get_entrance("Foetid Manse (E5M7) Yellow -> Foetid Manse (E5M7) Blue", player), lambda state: + set_rule(multiworld.get_entrance("Foetid Manse (E5M7) Yellow -> Foetid Manse (E5M7) Blue", player), lambda state: state.has("Foetid Manse (E5M7) - Blue key", player, 1)) # Field of Judgement (E5M8) - set_rule(world.get_entrance("Hub -> Field of Judgement (E5M8) Main", player), lambda state: + set_rule(multiworld.get_entrance("Hub -> Field of Judgement (E5M8) Main", player), lambda state: state.has("Field of Judgement (E5M8)", player, 1) and state.has("Ethereal Crossbow", player, 1) and state.has("Dragon Claw", player, 1) and @@ -699,7 +699,7 @@ def set_episode5_rules(player, world, pro): state.has("Bag of Holding", player, 1)) # Skein of D'Sparil (E5M9) - set_rule(world.get_entrance("Hub -> Skein of D'Sparil (E5M9) Main", player), lambda state: + set_rule(multiworld.get_entrance("Hub -> Skein of D'Sparil (E5M9) Main", player), lambda state: state.has("Skein of D'Sparil (E5M9)", player, 1) and state.has("Bag of Holding", player, 1) and state.has("Hellstaff", player, 1) and @@ -708,29 +708,29 @@ def set_episode5_rules(player, world, pro): state.has("Ethereal Crossbow", player, 1) and state.has("Gauntlets of the Necromancer", player, 1) and state.has("Firemace", player, 1)) - set_rule(world.get_entrance("Skein of D'Sparil (E5M9) Main -> Skein of D'Sparil (E5M9) Blue", player), lambda state: + set_rule(multiworld.get_entrance("Skein of D'Sparil (E5M9) Main -> Skein of D'Sparil (E5M9) Blue", player), lambda state: state.has("Skein of D'Sparil (E5M9) - Blue key", player, 1)) - set_rule(world.get_entrance("Skein of D'Sparil (E5M9) Main -> Skein of D'Sparil (E5M9) Yellow", player), lambda state: + set_rule(multiworld.get_entrance("Skein of D'Sparil (E5M9) Main -> Skein of D'Sparil (E5M9) Yellow", player), lambda state: state.has("Skein of D'Sparil (E5M9) - Yellow key", player, 1)) - set_rule(world.get_entrance("Skein of D'Sparil (E5M9) Main -> Skein of D'Sparil (E5M9) Green", player), lambda state: + set_rule(multiworld.get_entrance("Skein of D'Sparil (E5M9) Main -> Skein of D'Sparil (E5M9) Green", player), lambda state: state.has("Skein of D'Sparil (E5M9) - Green key", player, 1)) - set_rule(world.get_entrance("Skein of D'Sparil (E5M9) Yellow -> Skein of D'Sparil (E5M9) Main", player), lambda state: + set_rule(multiworld.get_entrance("Skein of D'Sparil (E5M9) Yellow -> Skein of D'Sparil (E5M9) Main", player), lambda state: state.has("Skein of D'Sparil (E5M9) - Yellow key", player, 1)) - set_rule(world.get_entrance("Skein of D'Sparil (E5M9) Green -> Skein of D'Sparil (E5M9) Main", player), lambda state: + set_rule(multiworld.get_entrance("Skein of D'Sparil (E5M9) Green -> Skein of D'Sparil (E5M9) Main", player), lambda state: state.has("Skein of D'Sparil (E5M9) - Green key", player, 1)) def set_rules(heretic_world: "HereticWorld", included_episodes, pro): player = heretic_world.player - world = heretic_world.multiworld + multiworld = heretic_world.multiworld if included_episodes[0]: - set_episode1_rules(player, world, pro) + set_episode1_rules(player, multiworld, pro) if included_episodes[1]: - set_episode2_rules(player, world, pro) + set_episode2_rules(player, multiworld, pro) if included_episodes[2]: - set_episode3_rules(player, world, pro) + set_episode3_rules(player, multiworld, pro) if included_episodes[3]: - set_episode4_rules(player, world, pro) + set_episode4_rules(player, multiworld, pro) if included_episodes[4]: - set_episode5_rules(player, world, pro) + set_episode5_rules(player, multiworld, pro) diff --git a/worlds/heretic/__init__.py b/worlds/heretic/__init__.py index b0b2bfce8f26..a0ceed4facb7 100644 --- a/worlds/heretic/__init__.py +++ b/worlds/heretic/__init__.py @@ -2,9 +2,10 @@ import logging from typing import Any, Dict, List, Set -from BaseClasses import Entrance, CollectionState, Item, ItemClassification, Location, MultiWorld, Region, Tutorial +from BaseClasses import Entrance, CollectionState, Item, Location, MultiWorld, Region, Tutorial from worlds.AutoWorld import WebWorld, World -from . import Items, Locations, Maps, Options, Regions, Rules +from . import Items, Locations, Maps, Regions, Rules +from .Options import HereticOptions logger = logging.getLogger("Heretic") @@ -36,7 +37,8 @@ class HereticWorld(World): """ Heretic is a dark fantasy first-person shooter video game released in December 1994. It was developed by Raven Software. """ - option_definitions = Options.options + options_dataclass = HereticOptions + options: HereticOptions game = "Heretic" web = HereticWeb() data_version = 3 @@ -56,7 +58,7 @@ class HereticWorld(World): "Ochre Cliffs (E5M1)" ] - boss_level_for_espidoes: List[str] = [ + boss_level_for_episode: List[str] = [ "Hell's Maw (E1M8)", "The Portals of Chaos (E2M8)", "D'Sparil'S Keep (E3M8)", @@ -77,27 +79,30 @@ class HereticWorld(World): "Shadowsphere": 1 } - def __init__(self, world: MultiWorld, player: int): + def __init__(self, multiworld: MultiWorld, player: int): self.included_episodes = [1, 1, 1, 0, 0] self.location_count = 0 - super().__init__(world, player) + super().__init__(multiworld, player) def get_episode_count(self): return functools.reduce(lambda count, episode: count + episode, self.included_episodes) def generate_early(self): # Cache which episodes are included - for i in range(5): - self.included_episodes[i] = getattr(self.multiworld, f"episode{i + 1}")[self.player].value + self.included_episodes[0] = self.options.episode1.value + self.included_episodes[1] = self.options.episode2.value + self.included_episodes[2] = self.options.episode3.value + self.included_episodes[3] = self.options.episode4.value + self.included_episodes[4] = self.options.episode5.value # If no episodes selected, select Episode 1 if self.get_episode_count() == 0: self.included_episodes[0] = 1 def create_regions(self): - pro = getattr(self.multiworld, "pro")[self.player].value - check_sanity = getattr(self.multiworld, "check_sanity")[self.player].value + pro = self.options.pro.value + check_sanity = self.options.check_sanity.value # Main regions menu_region = Region("Menu", self.player, self.multiworld) @@ -148,8 +153,8 @@ def create_regions(self): def completion_rule(self, state: CollectionState): goal_levels = Maps.map_names - if getattr(self.multiworld, "goal")[self.player].value: - goal_levels = self.boss_level_for_espidoes + if self.options.goal.value: + goal_levels = self.boss_level_for_episode for map_name in goal_levels: if map_name + " - Exit" not in self.location_name_to_id: @@ -167,8 +172,8 @@ def completion_rule(self, state: CollectionState): return True def set_rules(self): - pro = getattr(self.multiworld, "pro")[self.player].value - allow_death_logic = getattr(self.multiworld, "allow_death_logic")[self.player].value + pro = self.options.pro.value + allow_death_logic = self.options.allow_death_logic.value Rules.set_rules(self, self.included_episodes, pro) self.multiworld.completion_condition[self.player] = lambda state: self.completion_rule(state) @@ -185,7 +190,7 @@ def create_item(self, name: str) -> HereticItem: def create_items(self): itempool: List[HereticItem] = [] - start_with_map_scrolls: bool = getattr(self.multiworld, "start_with_map_scrolls")[self.player].value + start_with_map_scrolls: bool = self.options.start_with_map_scrolls.value # Items for item_id, item in Items.item_table.items(): @@ -225,7 +230,7 @@ def create_items(self): self.multiworld.push_precollected(self.create_item(self.starting_level_for_episode[i])) # Give Computer area maps if option selected - if getattr(self.multiworld, "start_with_map_scrolls")[self.player].value: + if self.options.start_with_map_scrolls.value: for item_id, item_dict in Items.item_table.items(): item_episode = item_dict["episode"] if item_episode > 0: @@ -275,7 +280,7 @@ def create_ratioed_items(self, item_name: str, itempool: List[HereticItem]): itempool.append(self.create_item(item_name)) def fill_slot_data(self) -> Dict[str, Any]: - slot_data = self.options.as_dict("difficulty", "random_monsters", "random_pickups", "random_music", "allow_death_logic", "pro", "death_link", "reset_level_on_death", "check_sanity") + slot_data = self.options.as_dict("goal", "difficulty", "random_monsters", "random_pickups", "random_music", "allow_death_logic", "pro", "death_link", "reset_level_on_death", "check_sanity") # Make sure we send proper episode settings slot_data["episode1"] = self.included_episodes[0] diff --git a/worlds/heretic/docs/setup_en.md b/worlds/heretic/docs/setup_en.md index e01d616e8ff1..41b7fdab8078 100644 --- a/worlds/heretic/docs/setup_en.md +++ b/worlds/heretic/docs/setup_en.md @@ -13,7 +13,7 @@ 1. Download [APDOOM.zip](https://github.com/Daivuk/apdoom/releases) and extract it. 2. Copy HERETIC.WAD from your steam install into the extracted folder. You can find the folder in steam by finding the game in your library, - right clicking it and choosing *Manage→Browse Local Files*. + right clicking it and choosing *Manage→Browse Local Files*. The WAD file is in the `/base/` folder. ## Joining a MultiWorld Game From 5ec342abf4be1d60c23e461b5692650b2822da00 Mon Sep 17 00:00:00 2001 From: Scipio Wright Date: Thu, 18 Apr 2024 12:54:03 -0400 Subject: [PATCH 080/153] Noita: Add Meat Realm (#3119) --- worlds/noita/locations.py | 10 ++++------ worlds/noita/options.py | 2 +- worlds/noita/regions.py | 2 +- 3 files changed, 6 insertions(+), 8 deletions(-) diff --git a/worlds/noita/locations.py b/worlds/noita/locations.py index 01801b158509..926a502fbca4 100644 --- a/worlds/noita/locations.py +++ b/worlds/noita/locations.py @@ -118,11 +118,7 @@ class LocationFlag(IntEnum): "Mines Chest": LocationData(110046, LocationFlag.main_path, "chest"), "Mines Pedestal": LocationData(110066, LocationFlag.main_path, "pedestal"), }, - # Collapsed Mines is a very small area, combining it with the Mines. Leaving this here in case we change our minds. - # "Collapsed Mines": { - # "Collapsed Mines Chest": LocationData(110086, LocationFlag.main_path, "chest"), - # "Collapsed Mines Pedestal": LocationData(110106, LocationFlag.main_path, "pedestal"), - # }, + # Collapsed Mines is a very small area, combining it with the Mines. Leaving this here as a reminder "Ancient Laboratory": { "Ylialkemisti": LocationData(110656, LocationFlag.side_path, "boss"), }, @@ -190,7 +186,9 @@ class LocationFlag(IntEnum): "Unohdettu": LocationData(110653, LocationFlag.main_world, "boss"), "Snow Chasm Orb": LocationData(110667, LocationFlag.main_world, "orb"), }, - "Deep Underground": { + "Meat Realm": { + "Meat Realm Chest": LocationData(110086, LocationFlag.main_world, "chest"), + "Meat Realm Pedestal": LocationData(110106, LocationFlag.main_world, "pedestal"), "Limatoukka": LocationData(110647, LocationFlag.main_world, "boss"), }, "West Meat Realm": { diff --git a/worlds/noita/options.py b/worlds/noita/options.py index 3600c0ca163e..f2ccbfbc4d3b 100644 --- a/worlds/noita/options.py +++ b/worlds/noita/options.py @@ -6,7 +6,7 @@ class PathOption(Choice): """Choose where you would like Hidden Chest and Pedestal checks to be placed. Main Path includes the main 7 biomes you typically go through to get to the final boss. Side Path includes the Lukki Lair and Fungal Caverns. 9 biomes total. - Main World includes the full world (excluding parallel worlds). 14 biomes total. + Main World includes the full world (excluding parallel worlds). 15 biomes total. Note: The Collapsed Mines have been combined into the Mines as the biome is tiny.""" display_name = "Path Option" option_main_path = 1 diff --git a/worlds/noita/regions.py b/worlds/noita/regions.py index 8ea8a41e85f6..a556b102cc04 100644 --- a/worlds/noita/regions.py +++ b/worlds/noita/regions.py @@ -109,7 +109,7 @@ def create_all_regions_and_connections(world: "NoitaWorld") -> None: "Temple of the Art Holy Mountain": ["Temple of the Art"], "Temple of the Art": ["Laboratory Holy Mountain", "The Tower", "Wizards' Den"], "Wizards' Den": ["Powerplant"], - "Powerplant": ["Deep Underground"], + "Powerplant": ["Meat Realm"], ### "Laboratory Holy Mountain": ["The Laboratory"], From 3c70621f1b480291e92c9cc8018e1aaaf19a47a5 Mon Sep 17 00:00:00 2001 From: lordlou <87331798+lordlou@users.noreply.github.com> Date: Thu, 18 Apr 2024 12:54:46 -0400 Subject: [PATCH 081/153] SM: getitem cheat fix (#3102) --- worlds/sm/Client.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/worlds/sm/Client.py b/worlds/sm/Client.py index ed3f2d5b3d30..7c97f743c552 100644 --- a/worlds/sm/Client.py +++ b/worlds/sm/Client.py @@ -139,7 +139,7 @@ async def game_watcher(self, ctx): if item_out_ptr < len(ctx.items_received): item = ctx.items_received[item_out_ptr] item_id = item.item - items_start_id - if bool(ctx.items_handling & 0b010): + if bool(ctx.items_handling & 0b010) or item.location < 0: # item.location < 0 for !getitem to work location_id = (item.location - locations_start_id) if (item.location >= 0 and item.player == ctx.slot) else 0xFF else: location_id = 0x00 #backward compat From 2704015eef0217eca57977d09e1589aa6dacbfda Mon Sep 17 00:00:00 2001 From: JaredWeakStrike <96694163+JaredWeakStrike@users.noreply.github.com> Date: Thu, 18 Apr 2024 12:55:27 -0400 Subject: [PATCH 082/153] KH2: Docs updates and Excluded Locations Bugfix (#3150) --- worlds/kh2/OpenKH.py | 2 ++ worlds/kh2/Options.py | 2 +- worlds/kh2/__init__.py | 2 +- worlds/kh2/docs/setup_en.md | 16 +++++++++------- 4 files changed, 13 insertions(+), 9 deletions(-) diff --git a/worlds/kh2/OpenKH.py b/worlds/kh2/OpenKH.py index c30aeec67fdd..17d7f84e8cfd 100644 --- a/worlds/kh2/OpenKH.py +++ b/worlds/kh2/OpenKH.py @@ -413,6 +413,8 @@ def increaseStat(i): ] mod_dir = os.path.join(output_directory, mod_name + "_" + Utils.__version__) + self.mod_yml["title"] = f"Randomizer Seed {mod_name}" + openkhmod = { "TrsrList.yml": yaml.dump(self.formattedTrsr, line_break="\n"), "LvupList.yml": yaml.dump(self.formattedLvup, line_break="\n"), diff --git a/worlds/kh2/Options.py b/worlds/kh2/Options.py index b7caf7437007..ffe95d1d5f25 100644 --- a/worlds/kh2/Options.py +++ b/worlds/kh2/Options.py @@ -306,7 +306,7 @@ class CorSkipToggle(Toggle): Toggle does not negate fight logic but is an alternative. - Final Chest is also can be put into logic with this skip. + Full Cor Skip is also affected by this Toggle. """ display_name = "CoR Skip Toggle." default = False diff --git a/worlds/kh2/__init__.py b/worlds/kh2/__init__.py index 4125bcb24c6d..15cfa11c93cf 100644 --- a/worlds/kh2/__init__.py +++ b/worlds/kh2/__init__.py @@ -422,7 +422,7 @@ def keyblade_pre_fill(self): keyblade_locations = [self.multiworld.get_location(location, self.player) for location in Keyblade_Slots.keys()] state = self.multiworld.get_all_state(False) keyblade_ability_pool_copy = self.keyblade_ability_pool.copy() - fill_restrictive(self.multiworld, state, keyblade_locations, keyblade_ability_pool_copy, True, True) + fill_restrictive(self.multiworld, state, keyblade_locations, keyblade_ability_pool_copy, True, True, allow_excluded=True) def starting_invo_verify(self): """ diff --git a/worlds/kh2/docs/setup_en.md b/worlds/kh2/docs/setup_en.md index 70b3a24abeb4..c6fdb020b8a4 100644 --- a/worlds/kh2/docs/setup_en.md +++ b/worlds/kh2/docs/setup_en.md @@ -13,9 +13,10 @@ - Needed for Archipelago 1. [`ArchipelagoKH2Client.exe`](https://github.com/ArchipelagoMW/Archipelago/releases)
- 2. `Install the mod from JaredWeakStrike/APCompanion using OpenKH Mod Manager`
- 3. `Install the mod from KH2FM-Mods-equations19/auto-save using OpenKH Mod Manager`
- 4. `AP Randomizer Seed` + 2. `Install the Archipelago Companion mod from JaredWeakStrike/APCompanion using OpenKH Mod Manager`
+ 3. `Install the Archipelago Quality Of Life mod from JaredWeakStrike/AP_QOL using OpenKH Mod Manager`
+ 4. `Install the mod from KH2FM-Mods-equations19/auto-save using OpenKH Mod Manager`
+ 5. `AP Randomizer Seed`

Required: Archipelago Companion Mod

Load this mod just like the GoA ROM you did during the KH2 Rando setup. `JaredWeakStrike/APCompanion`
@@ -23,7 +24,7 @@ Have this mod second-highest priority below the .zip seed.
This mod is based upon Num's Garden of Assemblege Mod and requires it to work. Without Num this could not be possible.

Required: Auto Save Mod

-Load this mod just like the GoA ROM you did during the KH2 Rando setup. `KH2FM-Mods-equations19/auto-save` Location doesn't matter, required in case of crashes. +Load this mod just like the GoA ROM you did during the KH2 Rando setup. `KH2FM-Mods-equations19/auto-save` Location doesn't matter, required in case of crashes. See [Best Practices](en#best-practices) on how to load the auto save

Installing A Seed

@@ -32,7 +33,7 @@ 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.

What the Mod Manager Should Look Like.

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

Using the KH2 Client

@@ -60,7 +61,7 @@ Enter `The room's port number` into the top box where the x's are and pr - To fix this look over the guide at [KH2Rando.com](https://tommadness.github.io/KH2Randomizer/setup/Panacea-ModLoader/). Specifically the Panacea and Lua Backend Steps. -

Best Practices

+

Best Practices

- Make a save at the start of the GoA before opening anything. This will be the file to select when loading an autosave if/when your game crashes. - If you don't want to have a save in the GoA. Disconnect the client, load the auto save, and then reconnect the client after it loads the auto save. @@ -71,7 +72,8 @@ Enter `The room's port number` into the top box where the x's are and pr

Logic Sheet

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)

F.A.Q.

- +- Why is my Client giving me a "Cannot Open Process: " error? + - Due to how the client reads kingdom hearts 2 memory some people's computer flags it as a virus. Run the client as admin. - Why is my HP/MP continuously increasing without stopping? - You do not have `JaredWeakStrike/APCompanion` set up correctly. Make sure it is above the `GoA ROM Mod` in the mod manager. - Why is my HP/MP continuously increasing without stopping when I have the APCompanion Mod? From ffff63e6f358d1a0d86302ae6e07fece135c3d06 Mon Sep 17 00:00:00 2001 From: David St-Louis Date: Thu, 18 Apr 2024 12:56:10 -0400 Subject: [PATCH 083/153] DOOM 1993: Update to use new Options + logic fixes + Doc fix (#3138) --- worlds/doom_1993/Options.py | 42 ++-- worlds/doom_1993/Rules.py | 323 +++++++++++++++--------------- worlds/doom_1993/__init__.py | 32 +-- worlds/doom_1993/docs/setup_en.md | 2 +- 4 files changed, 204 insertions(+), 195 deletions(-) diff --git a/worlds/doom_1993/Options.py b/worlds/doom_1993/Options.py index 59f7bcef49a2..f65952d3eb49 100644 --- a/worlds/doom_1993/Options.py +++ b/worlds/doom_1993/Options.py @@ -1,6 +1,5 @@ -import typing - -from Options import AssembleOptions, Choice, Toggle, DeathLink, DefaultOnToggle, StartInventoryPool +from Options import PerGameCommonOptions, Choice, Toggle, DeathLink, DefaultOnToggle, StartInventoryPool +from dataclasses import dataclass class Goal(Choice): @@ -140,21 +139,22 @@ class Episode4(Toggle): display_name = "Episode 4" -options: typing.Dict[str, AssembleOptions] = { - "start_inventory_from_pool": StartInventoryPool, - "goal": Goal, - "difficulty": Difficulty, - "random_monsters": RandomMonsters, - "random_pickups": RandomPickups, - "random_music": RandomMusic, - "flip_levels": FlipLevels, - "allow_death_logic": AllowDeathLogic, - "pro": Pro, - "start_with_computer_area_maps": StartWithComputerAreaMaps, - "death_link": DeathLink, - "reset_level_on_death": ResetLevelOnDeath, - "episode1": Episode1, - "episode2": Episode2, - "episode3": Episode3, - "episode4": Episode4 -} +@dataclass +class DOOM1993Options(PerGameCommonOptions): + start_inventory_from_pool: StartInventoryPool + goal: Goal + difficulty: Difficulty + random_monsters: RandomMonsters + random_pickups: RandomPickups + random_music: RandomMusic + flip_levels: FlipLevels + allow_death_logic: AllowDeathLogic + pro: Pro + start_with_computer_area_maps: StartWithComputerAreaMaps + death_link: DeathLink + reset_level_on_death: ResetLevelOnDeath + episode1: Episode1 + episode2: Episode2 + episode3: Episode3 + episode4: Episode4 + diff --git a/worlds/doom_1993/Rules.py b/worlds/doom_1993/Rules.py index d5abc367a149..4faeb4a27dbd 100644 --- a/worlds/doom_1993/Rules.py +++ b/worlds/doom_1993/Rules.py @@ -7,105 +7,105 @@ from . import DOOM1993World -def set_episode1_rules(player, world, pro): +def set_episode1_rules(player, multiworld, pro): # Hangar (E1M1) - set_rule(world.get_entrance("Hub -> Hangar (E1M1) Main", player), lambda state: + set_rule(multiworld.get_entrance("Hub -> Hangar (E1M1) Main", player), lambda state: state.has("Hangar (E1M1)", player, 1)) # Nuclear Plant (E1M2) - set_rule(world.get_entrance("Hub -> Nuclear Plant (E1M2) Main", player), lambda state: + set_rule(multiworld.get_entrance("Hub -> Nuclear Plant (E1M2) Main", player), lambda state: (state.has("Nuclear Plant (E1M2)", player, 1)) and (state.has("Shotgun", player, 1) or state.has("Chaingun", player, 1))) - set_rule(world.get_entrance("Nuclear Plant (E1M2) Main -> Nuclear Plant (E1M2) Red", player), lambda state: + set_rule(multiworld.get_entrance("Nuclear Plant (E1M2) Main -> Nuclear Plant (E1M2) Red", player), lambda state: state.has("Nuclear Plant (E1M2) - Red keycard", player, 1)) - set_rule(world.get_entrance("Nuclear Plant (E1M2) Red -> Nuclear Plant (E1M2) Main", player), lambda state: + set_rule(multiworld.get_entrance("Nuclear Plant (E1M2) Red -> Nuclear Plant (E1M2) Main", player), lambda state: state.has("Nuclear Plant (E1M2) - Red keycard", player, 1)) # Toxin Refinery (E1M3) - set_rule(world.get_entrance("Hub -> Toxin Refinery (E1M3) Main", player), lambda state: + set_rule(multiworld.get_entrance("Hub -> Toxin Refinery (E1M3) Main", player), lambda state: (state.has("Toxin Refinery (E1M3)", player, 1)) and (state.has("Shotgun", player, 1) or state.has("Chaingun", player, 1))) - set_rule(world.get_entrance("Toxin Refinery (E1M3) Main -> Toxin Refinery (E1M3) Blue", player), lambda state: + set_rule(multiworld.get_entrance("Toxin Refinery (E1M3) Main -> Toxin Refinery (E1M3) Blue", player), lambda state: state.has("Toxin Refinery (E1M3) - Blue keycard", player, 1)) - set_rule(world.get_entrance("Toxin Refinery (E1M3) Blue -> Toxin Refinery (E1M3) Yellow", player), lambda state: + set_rule(multiworld.get_entrance("Toxin Refinery (E1M3) Blue -> Toxin Refinery (E1M3) Yellow", player), lambda state: state.has("Toxin Refinery (E1M3) - Yellow keycard", player, 1)) - set_rule(world.get_entrance("Toxin Refinery (E1M3) Blue -> Toxin Refinery (E1M3) Main", player), lambda state: + set_rule(multiworld.get_entrance("Toxin Refinery (E1M3) Blue -> Toxin Refinery (E1M3) Main", player), lambda state: state.has("Toxin Refinery (E1M3) - Blue keycard", player, 1)) - set_rule(world.get_entrance("Toxin Refinery (E1M3) Yellow -> Toxin Refinery (E1M3) Blue", player), lambda state: + set_rule(multiworld.get_entrance("Toxin Refinery (E1M3) Yellow -> Toxin Refinery (E1M3) Blue", player), lambda state: state.has("Toxin Refinery (E1M3) - Yellow keycard", player, 1)) # Command Control (E1M4) - set_rule(world.get_entrance("Hub -> Command Control (E1M4) Main", player), lambda state: + set_rule(multiworld.get_entrance("Hub -> Command Control (E1M4) Main", player), lambda state: state.has("Command Control (E1M4)", player, 1) and state.has("Shotgun", player, 1) and state.has("Chaingun", player, 1)) - set_rule(world.get_entrance("Command Control (E1M4) Main -> Command Control (E1M4) Blue", player), lambda state: + set_rule(multiworld.get_entrance("Command Control (E1M4) Main -> Command Control (E1M4) Blue", player), lambda state: state.has("Command Control (E1M4) - Blue keycard", player, 1) or state.has("Command Control (E1M4) - Yellow keycard", player, 1)) - set_rule(world.get_entrance("Command Control (E1M4) Main -> Command Control (E1M4) Yellow", player), lambda state: + set_rule(multiworld.get_entrance("Command Control (E1M4) Main -> Command Control (E1M4) Yellow", player), lambda state: state.has("Command Control (E1M4) - Blue keycard", player, 1) or state.has("Command Control (E1M4) - Yellow keycard", player, 1)) - set_rule(world.get_entrance("Command Control (E1M4) Blue -> Command Control (E1M4) Main", player), lambda state: + set_rule(multiworld.get_entrance("Command Control (E1M4) Blue -> Command Control (E1M4) Main", player), lambda state: state.has("Command Control (E1M4) - Yellow keycard", player, 1) or state.has("Command Control (E1M4) - Blue keycard", player, 1)) # Phobos Lab (E1M5) - set_rule(world.get_entrance("Hub -> Phobos Lab (E1M5) Main", player), lambda state: + set_rule(multiworld.get_entrance("Hub -> Phobos Lab (E1M5) Main", player), lambda state: state.has("Phobos Lab (E1M5)", player, 1) and state.has("Shotgun", player, 1) and state.has("Chaingun", player, 1)) - set_rule(world.get_entrance("Phobos Lab (E1M5) Main -> Phobos Lab (E1M5) Yellow", player), lambda state: + set_rule(multiworld.get_entrance("Phobos Lab (E1M5) Main -> Phobos Lab (E1M5) Yellow", player), lambda state: state.has("Phobos Lab (E1M5) - Yellow keycard", player, 1)) - set_rule(world.get_entrance("Phobos Lab (E1M5) Yellow -> Phobos Lab (E1M5) Blue", player), lambda state: + set_rule(multiworld.get_entrance("Phobos Lab (E1M5) Yellow -> Phobos Lab (E1M5) Blue", player), lambda state: state.has("Phobos Lab (E1M5) - Blue keycard", player, 1)) - set_rule(world.get_entrance("Phobos Lab (E1M5) Blue -> Phobos Lab (E1M5) Green", player), lambda state: + set_rule(multiworld.get_entrance("Phobos Lab (E1M5) Blue -> Phobos Lab (E1M5) Green", player), lambda state: state.has("Phobos Lab (E1M5) - Blue keycard", player, 1)) - set_rule(world.get_entrance("Phobos Lab (E1M5) Green -> Phobos Lab (E1M5) Blue", player), lambda state: + set_rule(multiworld.get_entrance("Phobos Lab (E1M5) Green -> Phobos Lab (E1M5) Blue", player), lambda state: state.has("Phobos Lab (E1M5) - Blue keycard", player, 1)) # Central Processing (E1M6) - set_rule(world.get_entrance("Hub -> Central Processing (E1M6) Main", player), lambda state: + set_rule(multiworld.get_entrance("Hub -> Central Processing (E1M6) Main", player), lambda state: state.has("Central Processing (E1M6)", player, 1) and state.has("Shotgun", player, 1) and state.has("Chaingun", player, 1) and state.has("Rocket launcher", player, 1)) - set_rule(world.get_entrance("Central Processing (E1M6) Main -> Central Processing (E1M6) Yellow", player), lambda state: + set_rule(multiworld.get_entrance("Central Processing (E1M6) Main -> Central Processing (E1M6) Yellow", player), lambda state: state.has("Central Processing (E1M6) - Yellow keycard", player, 1)) - set_rule(world.get_entrance("Central Processing (E1M6) Main -> Central Processing (E1M6) Red", player), lambda state: + set_rule(multiworld.get_entrance("Central Processing (E1M6) Main -> Central Processing (E1M6) Red", player), lambda state: state.has("Central Processing (E1M6) - Red keycard", player, 1)) - set_rule(world.get_entrance("Central Processing (E1M6) Main -> Central Processing (E1M6) Blue", player), lambda state: + set_rule(multiworld.get_entrance("Central Processing (E1M6) Main -> Central Processing (E1M6) Blue", player), lambda state: state.has("Central Processing (E1M6) - Blue keycard", player, 1)) - set_rule(world.get_entrance("Central Processing (E1M6) Main -> Central Processing (E1M6) Nukage", player), lambda state: + set_rule(multiworld.get_entrance("Central Processing (E1M6) Main -> Central Processing (E1M6) Nukage", player), lambda state: state.has("Central Processing (E1M6) - Blue keycard", player, 1)) - set_rule(world.get_entrance("Central Processing (E1M6) Yellow -> Central Processing (E1M6) Main", player), lambda state: + set_rule(multiworld.get_entrance("Central Processing (E1M6) Yellow -> Central Processing (E1M6) Main", player), lambda state: state.has("Central Processing (E1M6) - Yellow keycard", player, 1)) # Computer Station (E1M7) - set_rule(world.get_entrance("Hub -> Computer Station (E1M7) Main", player), lambda state: + set_rule(multiworld.get_entrance("Hub -> Computer Station (E1M7) Main", player), lambda state: state.has("Computer Station (E1M7)", player, 1) and state.has("Shotgun", player, 1) and state.has("Chaingun", player, 1) and state.has("Rocket launcher", player, 1)) - set_rule(world.get_entrance("Computer Station (E1M7) Main -> Computer Station (E1M7) Red", player), lambda state: + set_rule(multiworld.get_entrance("Computer Station (E1M7) Main -> Computer Station (E1M7) Red", player), lambda state: state.has("Computer Station (E1M7) - Red keycard", player, 1)) - set_rule(world.get_entrance("Computer Station (E1M7) Main -> Computer Station (E1M7) Yellow", player), lambda state: + set_rule(multiworld.get_entrance("Computer Station (E1M7) Main -> Computer Station (E1M7) Yellow", player), lambda state: state.has("Computer Station (E1M7) - Yellow keycard", player, 1)) - set_rule(world.get_entrance("Computer Station (E1M7) Blue -> Computer Station (E1M7) Yellow", player), lambda state: + set_rule(multiworld.get_entrance("Computer Station (E1M7) Blue -> Computer Station (E1M7) Yellow", player), lambda state: state.has("Computer Station (E1M7) - Blue keycard", player, 1)) - set_rule(world.get_entrance("Computer Station (E1M7) Red -> Computer Station (E1M7) Main", player), lambda state: + set_rule(multiworld.get_entrance("Computer Station (E1M7) Red -> Computer Station (E1M7) Main", player), lambda state: state.has("Computer Station (E1M7) - Red keycard", player, 1)) - set_rule(world.get_entrance("Computer Station (E1M7) Yellow -> Computer Station (E1M7) Blue", player), lambda state: + set_rule(multiworld.get_entrance("Computer Station (E1M7) Yellow -> Computer Station (E1M7) Blue", player), lambda state: state.has("Computer Station (E1M7) - Blue keycard", player, 1)) - set_rule(world.get_entrance("Computer Station (E1M7) Yellow -> Computer Station (E1M7) Courtyard", player), lambda state: + set_rule(multiworld.get_entrance("Computer Station (E1M7) Yellow -> Computer Station (E1M7) Courtyard", player), lambda state: state.has("Computer Station (E1M7) - Yellow keycard", player, 1) and state.has("Computer Station (E1M7) - Red keycard", player, 1)) - set_rule(world.get_entrance("Computer Station (E1M7) Courtyard -> Computer Station (E1M7) Yellow", player), lambda state: + set_rule(multiworld.get_entrance("Computer Station (E1M7) Courtyard -> Computer Station (E1M7) Yellow", player), lambda state: state.has("Computer Station (E1M7) - Yellow keycard", player, 1)) # Phobos Anomaly (E1M8) - set_rule(world.get_entrance("Hub -> Phobos Anomaly (E1M8) Start", player), lambda state: + set_rule(multiworld.get_entrance("Hub -> Phobos Anomaly (E1M8) Start", player), lambda state: (state.has("Phobos Anomaly (E1M8)", player, 1) and state.has("Shotgun", player, 1) and state.has("Chaingun", player, 1)) and @@ -114,255 +114,260 @@ def set_episode1_rules(player, world, pro): state.has("BFG9000", player, 1))) # Military Base (E1M9) - set_rule(world.get_entrance("Hub -> Military Base (E1M9) Main", player), lambda state: + set_rule(multiworld.get_entrance("Hub -> Military Base (E1M9) Main", player), lambda state: state.has("Military Base (E1M9)", player, 1) and state.has("Chaingun", player, 1) and state.has("Shotgun", player, 1)) - set_rule(world.get_entrance("Military Base (E1M9) Main -> Military Base (E1M9) Blue", player), lambda state: + set_rule(multiworld.get_entrance("Military Base (E1M9) Main -> Military Base (E1M9) Blue", player), lambda state: state.has("Military Base (E1M9) - Blue keycard", player, 1)) - set_rule(world.get_entrance("Military Base (E1M9) Main -> Military Base (E1M9) Yellow", player), lambda state: + set_rule(multiworld.get_entrance("Military Base (E1M9) Main -> Military Base (E1M9) Yellow", player), lambda state: state.has("Military Base (E1M9) - Yellow keycard", player, 1)) - set_rule(world.get_entrance("Military Base (E1M9) Main -> Military Base (E1M9) Red", player), lambda state: + set_rule(multiworld.get_entrance("Military Base (E1M9) Main -> Military Base (E1M9) Red", player), lambda state: state.has("Military Base (E1M9) - Red keycard", player, 1)) - set_rule(world.get_entrance("Military Base (E1M9) Blue -> Military Base (E1M9) Main", player), lambda state: + set_rule(multiworld.get_entrance("Military Base (E1M9) Blue -> Military Base (E1M9) Main", player), lambda state: state.has("Military Base (E1M9) - Blue keycard", player, 1)) - set_rule(world.get_entrance("Military Base (E1M9) Yellow -> Military Base (E1M9) Main", player), lambda state: + set_rule(multiworld.get_entrance("Military Base (E1M9) Yellow -> Military Base (E1M9) Main", player), lambda state: state.has("Military Base (E1M9) - Yellow keycard", player, 1)) -def set_episode2_rules(player, world, pro): +def set_episode2_rules(player, multiworld, pro): # Deimos Anomaly (E2M1) - set_rule(world.get_entrance("Hub -> Deimos Anomaly (E2M1) Main", player), lambda state: + set_rule(multiworld.get_entrance("Hub -> Deimos Anomaly (E2M1) Main", player), lambda state: state.has("Deimos Anomaly (E2M1)", player, 1)) - set_rule(world.get_entrance("Deimos Anomaly (E2M1) Main -> Deimos Anomaly (E2M1) Red", player), lambda state: + set_rule(multiworld.get_entrance("Deimos Anomaly (E2M1) Main -> Deimos Anomaly (E2M1) Red", player), lambda state: state.has("Deimos Anomaly (E2M1) - Red keycard", player, 1)) - set_rule(world.get_entrance("Deimos Anomaly (E2M1) Main -> Deimos Anomaly (E2M1) Blue", player), lambda state: + set_rule(multiworld.get_entrance("Deimos Anomaly (E2M1) Main -> Deimos Anomaly (E2M1) Blue", player), lambda state: state.has("Deimos Anomaly (E2M1) - Blue keycard", player, 1)) - set_rule(world.get_entrance("Deimos Anomaly (E2M1) Blue -> Deimos Anomaly (E2M1) Main", player), lambda state: + set_rule(multiworld.get_entrance("Deimos Anomaly (E2M1) Blue -> Deimos Anomaly (E2M1) Main", player), lambda state: state.has("Deimos Anomaly (E2M1) - Blue keycard", player, 1)) - set_rule(world.get_entrance("Deimos Anomaly (E2M1) Red -> Deimos Anomaly (E2M1) Main", player), lambda state: + set_rule(multiworld.get_entrance("Deimos Anomaly (E2M1) Red -> Deimos Anomaly (E2M1) Main", player), lambda state: state.has("Deimos Anomaly (E2M1) - Red keycard", player, 1)) # Containment Area (E2M2) - set_rule(world.get_entrance("Hub -> Containment Area (E2M2) Main", player), lambda state: + set_rule(multiworld.get_entrance("Hub -> Containment Area (E2M2) Main", player), lambda state: (state.has("Containment Area (E2M2)", player, 1) and state.has("Shotgun", player, 1)) and (state.has("Chaingun", player, 1) or state.has("Plasma gun", player, 1))) - set_rule(world.get_entrance("Containment Area (E2M2) Main -> Containment Area (E2M2) Yellow", player), lambda state: + set_rule(multiworld.get_entrance("Containment Area (E2M2) Main -> Containment Area (E2M2) Yellow", player), lambda state: state.has("Containment Area (E2M2) - Yellow keycard", player, 1)) - set_rule(world.get_entrance("Containment Area (E2M2) Main -> Containment Area (E2M2) Blue", player), lambda state: + set_rule(multiworld.get_entrance("Containment Area (E2M2) Main -> Containment Area (E2M2) Blue", player), lambda state: state.has("Containment Area (E2M2) - Blue keycard", player, 1)) - set_rule(world.get_entrance("Containment Area (E2M2) Main -> Containment Area (E2M2) Red", player), lambda state: + set_rule(multiworld.get_entrance("Containment Area (E2M2) Main -> Containment Area (E2M2) Red", player), lambda state: state.has("Containment Area (E2M2) - Red keycard", player, 1)) - set_rule(world.get_entrance("Containment Area (E2M2) Blue -> Containment Area (E2M2) Main", player), lambda state: + set_rule(multiworld.get_entrance("Containment Area (E2M2) Blue -> Containment Area (E2M2) Main", player), lambda state: state.has("Containment Area (E2M2) - Blue keycard", player, 1)) - set_rule(world.get_entrance("Containment Area (E2M2) Red -> Containment Area (E2M2) Main", player), lambda state: + set_rule(multiworld.get_entrance("Containment Area (E2M2) Red -> Containment Area (E2M2) Main", player), lambda state: state.has("Containment Area (E2M2) - Red keycard", player, 1)) # Refinery (E2M3) - set_rule(world.get_entrance("Hub -> Refinery (E2M3) Main", player), lambda state: + set_rule(multiworld.get_entrance("Hub -> Refinery (E2M3) Main", player), lambda state: (state.has("Refinery (E2M3)", player, 1) and state.has("Shotgun", player, 1)) and (state.has("Chaingun", player, 1) or state.has("Plasma gun", player, 1))) - set_rule(world.get_entrance("Refinery (E2M3) Main -> Refinery (E2M3) Blue", player), lambda state: + set_rule(multiworld.get_entrance("Refinery (E2M3) Main -> Refinery (E2M3) Blue", player), lambda state: state.has("Refinery (E2M3) - Blue keycard", player, 1)) - set_rule(world.get_entrance("Refinery (E2M3) Blue -> Refinery (E2M3) Main", player), lambda state: + set_rule(multiworld.get_entrance("Refinery (E2M3) Blue -> Refinery (E2M3) Main", player), lambda state: state.has("Refinery (E2M3) - Blue keycard", player, 1)) # Deimos Lab (E2M4) - set_rule(world.get_entrance("Hub -> Deimos Lab (E2M4) Main", player), lambda state: + set_rule(multiworld.get_entrance("Hub -> Deimos Lab (E2M4) Main", player), lambda state: state.has("Deimos Lab (E2M4)", player, 1) and state.has("Shotgun", player, 1) and state.has("Chaingun", player, 1) and state.has("Plasma gun", player, 1)) - set_rule(world.get_entrance("Deimos Lab (E2M4) Main -> Deimos Lab (E2M4) Blue", player), lambda state: + set_rule(multiworld.get_entrance("Deimos Lab (E2M4) Main -> Deimos Lab (E2M4) Blue", player), lambda state: state.has("Deimos Lab (E2M4) - Blue keycard", player, 1)) - set_rule(world.get_entrance("Deimos Lab (E2M4) Blue -> Deimos Lab (E2M4) Yellow", player), lambda state: + set_rule(multiworld.get_entrance("Deimos Lab (E2M4) Blue -> Deimos Lab (E2M4) Yellow", player), lambda state: state.has("Deimos Lab (E2M4) - Yellow keycard", player, 1)) # Command Center (E2M5) - set_rule(world.get_entrance("Hub -> Command Center (E2M5) Main", player), lambda state: + set_rule(multiworld.get_entrance("Hub -> Command Center (E2M5) Main", player), lambda state: state.has("Command Center (E2M5)", player, 1) and state.has("Shotgun", player, 1) and state.has("Chaingun", player, 1) and state.has("Plasma gun", player, 1)) # Halls of the Damned (E2M6) - set_rule(world.get_entrance("Hub -> Halls of the Damned (E2M6) Main", player), lambda state: + set_rule(multiworld.get_entrance("Hub -> Halls of the Damned (E2M6) Main", player), lambda state: state.has("Halls of the Damned (E2M6)", player, 1) and state.has("Chaingun", player, 1) and state.has("Shotgun", player, 1) and state.has("Plasma gun", player, 1)) - set_rule(world.get_entrance("Halls of the Damned (E2M6) Main -> Halls of the Damned (E2M6) Blue Yellow Red", player), lambda state: + set_rule(multiworld.get_entrance("Halls of the Damned (E2M6) Main -> Halls of the Damned (E2M6) Blue Yellow Red", player), lambda state: state.has("Halls of the Damned (E2M6) - Blue skull key", player, 1) and state.has("Halls of the Damned (E2M6) - Yellow skull key", player, 1) and state.has("Halls of the Damned (E2M6) - Red skull key", player, 1)) - set_rule(world.get_entrance("Halls of the Damned (E2M6) Main -> Halls of the Damned (E2M6) Yellow", player), lambda state: + set_rule(multiworld.get_entrance("Halls of the Damned (E2M6) Main -> Halls of the Damned (E2M6) Yellow", player), lambda state: state.has("Halls of the Damned (E2M6) - Yellow skull key", player, 1)) - set_rule(world.get_entrance("Halls of the Damned (E2M6) Main -> Halls of the Damned (E2M6) One way Yellow", player), lambda state: + set_rule(multiworld.get_entrance("Halls of the Damned (E2M6) Main -> Halls of the Damned (E2M6) One way Yellow", player), lambda state: state.has("Halls of the Damned (E2M6) - Yellow skull key", player, 1)) - set_rule(world.get_entrance("Halls of the Damned (E2M6) Blue Yellow Red -> Halls of the Damned (E2M6) Main", player), lambda state: + set_rule(multiworld.get_entrance("Halls of the Damned (E2M6) Blue Yellow Red -> Halls of the Damned (E2M6) Main", player), lambda state: state.has("Halls of the Damned (E2M6) - Blue skull key", player, 1) and state.has("Halls of the Damned (E2M6) - Yellow skull key", player, 1) and state.has("Halls of the Damned (E2M6) - Red skull key", player, 1)) - set_rule(world.get_entrance("Halls of the Damned (E2M6) One way Yellow -> Halls of the Damned (E2M6) Main", player), lambda state: + set_rule(multiworld.get_entrance("Halls of the Damned (E2M6) One way Yellow -> Halls of the Damned (E2M6) Main", player), lambda state: state.has("Halls of the Damned (E2M6) - Yellow skull key", player, 1)) # Spawning Vats (E2M7) - set_rule(world.get_entrance("Hub -> Spawning Vats (E2M7) Main", player), lambda state: + set_rule(multiworld.get_entrance("Hub -> Spawning Vats (E2M7) Main", player), lambda state: state.has("Spawning Vats (E2M7)", player, 1) and state.has("Shotgun", player, 1) and state.has("Chaingun", player, 1) and state.has("Plasma gun", player, 1) and state.has("Rocket launcher", player, 1)) - set_rule(world.get_entrance("Spawning Vats (E2M7) Main -> Spawning Vats (E2M7) Blue", player), lambda state: + set_rule(multiworld.get_entrance("Spawning Vats (E2M7) Main -> Spawning Vats (E2M7) Blue", player), lambda state: state.has("Spawning Vats (E2M7) - Blue keycard", player, 1)) - set_rule(world.get_entrance("Spawning Vats (E2M7) Main -> Spawning Vats (E2M7) Entrance Secret", player), lambda state: + set_rule(multiworld.get_entrance("Spawning Vats (E2M7) Main -> Spawning Vats (E2M7) Entrance Secret", player), lambda state: state.has("Spawning Vats (E2M7) - Blue keycard", player, 1) and state.has("Spawning Vats (E2M7) - Red keycard", player, 1)) - set_rule(world.get_entrance("Spawning Vats (E2M7) Main -> Spawning Vats (E2M7) Red", player), lambda state: + set_rule(multiworld.get_entrance("Spawning Vats (E2M7) Main -> Spawning Vats (E2M7) Red", player), lambda state: state.has("Spawning Vats (E2M7) - Red keycard", player, 1)) - set_rule(world.get_entrance("Spawning Vats (E2M7) Main -> Spawning Vats (E2M7) Yellow", player), lambda state: + set_rule(multiworld.get_entrance("Spawning Vats (E2M7) Main -> Spawning Vats (E2M7) Yellow", player), lambda state: state.has("Spawning Vats (E2M7) - Yellow keycard", player, 1)) if pro: - set_rule(world.get_entrance("Spawning Vats (E2M7) Main -> Spawning Vats (E2M7) Red Exit", player), lambda state: + set_rule(multiworld.get_entrance("Spawning Vats (E2M7) Main -> Spawning Vats (E2M7) Red Exit", player), lambda state: state.has("Rocket launcher", player, 1)) - set_rule(world.get_entrance("Spawning Vats (E2M7) Yellow -> Spawning Vats (E2M7) Main", player), lambda state: + set_rule(multiworld.get_entrance("Spawning Vats (E2M7) Yellow -> Spawning Vats (E2M7) Main", player), lambda state: state.has("Spawning Vats (E2M7) - Yellow keycard", player, 1)) - set_rule(world.get_entrance("Spawning Vats (E2M7) Red -> Spawning Vats (E2M7) Main", player), lambda state: + set_rule(multiworld.get_entrance("Spawning Vats (E2M7) Red -> Spawning Vats (E2M7) Main", player), lambda state: state.has("Spawning Vats (E2M7) - Red keycard", player, 1)) - set_rule(world.get_entrance("Spawning Vats (E2M7) Entrance Secret -> Spawning Vats (E2M7) Main", player), lambda state: + set_rule(multiworld.get_entrance("Spawning Vats (E2M7) Entrance Secret -> Spawning Vats (E2M7) Main", player), lambda state: state.has("Spawning Vats (E2M7) - Blue keycard", player, 1) and state.has("Spawning Vats (E2M7) - Red keycard", player, 1)) # Tower of Babel (E2M8) - set_rule(world.get_entrance("Hub -> Tower of Babel (E2M8) Main", player), lambda state: - state.has("Tower of Babel (E2M8)", player, 1)) + set_rule(multiworld.get_entrance("Hub -> Tower of Babel (E2M8) Main", player), lambda state: + (state.has("Tower of Babel (E2M8)", player, 1) and + state.has("Shotgun", player, 1) and + state.has("Chaingun", player, 1)) and + (state.has("Rocket launcher", player, 1) or + state.has("Plasma gun", player, 1) or + state.has("BFG9000", player, 1))) # Fortress of Mystery (E2M9) - set_rule(world.get_entrance("Hub -> Fortress of Mystery (E2M9) Main", player), lambda state: + set_rule(multiworld.get_entrance("Hub -> Fortress of Mystery (E2M9) Main", player), lambda state: (state.has("Fortress of Mystery (E2M9)", player, 1) and state.has("Shotgun", player, 1) and state.has("Chaingun", player, 1)) and (state.has("Rocket launcher", player, 1) or state.has("Plasma gun", player, 1) or state.has("BFG9000", player, 1))) - set_rule(world.get_entrance("Fortress of Mystery (E2M9) Main -> Fortress of Mystery (E2M9) Blue", player), lambda state: + set_rule(multiworld.get_entrance("Fortress of Mystery (E2M9) Main -> Fortress of Mystery (E2M9) Blue", player), lambda state: state.has("Fortress of Mystery (E2M9) - Blue skull key", player, 1)) - set_rule(world.get_entrance("Fortress of Mystery (E2M9) Main -> Fortress of Mystery (E2M9) Red", player), lambda state: + set_rule(multiworld.get_entrance("Fortress of Mystery (E2M9) Main -> Fortress of Mystery (E2M9) Red", player), lambda state: state.has("Fortress of Mystery (E2M9) - Red skull key", player, 1)) - set_rule(world.get_entrance("Fortress of Mystery (E2M9) Main -> Fortress of Mystery (E2M9) Yellow", player), lambda state: + set_rule(multiworld.get_entrance("Fortress of Mystery (E2M9) Main -> Fortress of Mystery (E2M9) Yellow", player), lambda state: state.has("Fortress of Mystery (E2M9) - Yellow skull key", player, 1)) - set_rule(world.get_entrance("Fortress of Mystery (E2M9) Blue -> Fortress of Mystery (E2M9) Main", player), lambda state: + set_rule(multiworld.get_entrance("Fortress of Mystery (E2M9) Blue -> Fortress of Mystery (E2M9) Main", player), lambda state: state.has("Fortress of Mystery (E2M9) - Blue skull key", player, 1)) - set_rule(world.get_entrance("Fortress of Mystery (E2M9) Red -> Fortress of Mystery (E2M9) Main", player), lambda state: + set_rule(multiworld.get_entrance("Fortress of Mystery (E2M9) Red -> Fortress of Mystery (E2M9) Main", player), lambda state: state.has("Fortress of Mystery (E2M9) - Red skull key", player, 1)) - set_rule(world.get_entrance("Fortress of Mystery (E2M9) Yellow -> Fortress of Mystery (E2M9) Main", player), lambda state: + set_rule(multiworld.get_entrance("Fortress of Mystery (E2M9) Yellow -> Fortress of Mystery (E2M9) Main", player), lambda state: state.has("Fortress of Mystery (E2M9) - Yellow skull key", player, 1)) -def set_episode3_rules(player, world, pro): +def set_episode3_rules(player, multiworld, pro): # Hell Keep (E3M1) - set_rule(world.get_entrance("Hub -> Hell Keep (E3M1) Main", player), lambda state: + set_rule(multiworld.get_entrance("Hub -> Hell Keep (E3M1) Main", player), lambda state: state.has("Hell Keep (E3M1)", player, 1)) - set_rule(world.get_entrance("Hell Keep (E3M1) Main -> Hell Keep (E3M1) Narrow", player), lambda state: + set_rule(multiworld.get_entrance("Hell Keep (E3M1) Main -> Hell Keep (E3M1) Narrow", player), lambda state: state.has("Chaingun", player, 1) or state.has("Shotgun", player, 1)) # Slough of Despair (E3M2) - set_rule(world.get_entrance("Hub -> Slough of Despair (E3M2) Main", player), lambda state: + set_rule(multiworld.get_entrance("Hub -> Slough of Despair (E3M2) Main", player), lambda state: (state.has("Slough of Despair (E3M2)", player, 1)) and (state.has("Shotgun", player, 1) or state.has("Chaingun", player, 1))) - set_rule(world.get_entrance("Slough of Despair (E3M2) Main -> Slough of Despair (E3M2) Blue", player), lambda state: + set_rule(multiworld.get_entrance("Slough of Despair (E3M2) Main -> Slough of Despair (E3M2) Blue", player), lambda state: state.has("Slough of Despair (E3M2) - Blue skull key", player, 1)) - set_rule(world.get_entrance("Slough of Despair (E3M2) Blue -> Slough of Despair (E3M2) Main", player), lambda state: + set_rule(multiworld.get_entrance("Slough of Despair (E3M2) Blue -> Slough of Despair (E3M2) Main", player), lambda state: state.has("Slough of Despair (E3M2) - Blue skull key", player, 1)) # Pandemonium (E3M3) - set_rule(world.get_entrance("Hub -> Pandemonium (E3M3) Main", player), lambda state: + set_rule(multiworld.get_entrance("Hub -> Pandemonium (E3M3) Main", player), lambda state: (state.has("Pandemonium (E3M3)", player, 1) and state.has("Shotgun", player, 1) and state.has("Chaingun", player, 1)) and (state.has("Rocket launcher", player, 1) or state.has("Plasma gun", player, 1) or state.has("BFG9000", player, 1))) - set_rule(world.get_entrance("Pandemonium (E3M3) Main -> Pandemonium (E3M3) Blue", player), lambda state: + set_rule(multiworld.get_entrance("Pandemonium (E3M3) Main -> Pandemonium (E3M3) Blue", player), lambda state: state.has("Pandemonium (E3M3) - Blue skull key", player, 1)) - set_rule(world.get_entrance("Pandemonium (E3M3) Blue -> Pandemonium (E3M3) Main", player), lambda state: + set_rule(multiworld.get_entrance("Pandemonium (E3M3) Blue -> Pandemonium (E3M3) Main", player), lambda state: state.has("Pandemonium (E3M3) - Blue skull key", player, 1)) # House of Pain (E3M4) - set_rule(world.get_entrance("Hub -> House of Pain (E3M4) Main", player), lambda state: + set_rule(multiworld.get_entrance("Hub -> House of Pain (E3M4) Main", player), lambda state: (state.has("House of Pain (E3M4)", player, 1) and state.has("Shotgun", player, 1) and state.has("Chaingun", player, 1)) and (state.has("Rocket launcher", player, 1) or state.has("Plasma gun", player, 1) or state.has("BFG9000", player, 1))) - set_rule(world.get_entrance("House of Pain (E3M4) Main -> House of Pain (E3M4) Blue", player), lambda state: + set_rule(multiworld.get_entrance("House of Pain (E3M4) Main -> House of Pain (E3M4) Blue", player), lambda state: state.has("House of Pain (E3M4) - Blue skull key", player, 1)) - set_rule(world.get_entrance("House of Pain (E3M4) Blue -> House of Pain (E3M4) Main", player), lambda state: + set_rule(multiworld.get_entrance("House of Pain (E3M4) Blue -> House of Pain (E3M4) Main", player), lambda state: state.has("House of Pain (E3M4) - Blue skull key", player, 1)) - set_rule(world.get_entrance("House of Pain (E3M4) Blue -> House of Pain (E3M4) Yellow", player), lambda state: + set_rule(multiworld.get_entrance("House of Pain (E3M4) Blue -> House of Pain (E3M4) Yellow", player), lambda state: state.has("House of Pain (E3M4) - Yellow skull key", player, 1)) - set_rule(world.get_entrance("House of Pain (E3M4) Blue -> House of Pain (E3M4) Red", player), lambda state: + set_rule(multiworld.get_entrance("House of Pain (E3M4) Blue -> House of Pain (E3M4) Red", player), lambda state: state.has("House of Pain (E3M4) - Red skull key", player, 1)) - set_rule(world.get_entrance("House of Pain (E3M4) Red -> House of Pain (E3M4) Blue", player), lambda state: + set_rule(multiworld.get_entrance("House of Pain (E3M4) Red -> House of Pain (E3M4) Blue", player), lambda state: state.has("House of Pain (E3M4) - Red skull key", player, 1)) - set_rule(world.get_entrance("House of Pain (E3M4) Yellow -> House of Pain (E3M4) Blue", player), lambda state: + set_rule(multiworld.get_entrance("House of Pain (E3M4) Yellow -> House of Pain (E3M4) Blue", player), lambda state: state.has("House of Pain (E3M4) - Yellow skull key", player, 1)) # Unholy Cathedral (E3M5) - set_rule(world.get_entrance("Hub -> Unholy Cathedral (E3M5) Main", player), lambda state: + set_rule(multiworld.get_entrance("Hub -> Unholy Cathedral (E3M5) Main", player), lambda state: (state.has("Unholy Cathedral (E3M5)", player, 1) and state.has("Chaingun", player, 1) and state.has("Shotgun", player, 1)) and (state.has("Rocket launcher", player, 1) or state.has("Plasma gun", player, 1) or state.has("BFG9000", player, 1))) - set_rule(world.get_entrance("Unholy Cathedral (E3M5) Main -> Unholy Cathedral (E3M5) Yellow", player), lambda state: + set_rule(multiworld.get_entrance("Unholy Cathedral (E3M5) Main -> Unholy Cathedral (E3M5) Yellow", player), lambda state: state.has("Unholy Cathedral (E3M5) - Yellow skull key", player, 1)) - set_rule(world.get_entrance("Unholy Cathedral (E3M5) Main -> Unholy Cathedral (E3M5) Blue", player), lambda state: + set_rule(multiworld.get_entrance("Unholy Cathedral (E3M5) Main -> Unholy Cathedral (E3M5) Blue", player), lambda state: state.has("Unholy Cathedral (E3M5) - Blue skull key", player, 1)) - set_rule(world.get_entrance("Unholy Cathedral (E3M5) Blue -> Unholy Cathedral (E3M5) Main", player), lambda state: + set_rule(multiworld.get_entrance("Unholy Cathedral (E3M5) Blue -> Unholy Cathedral (E3M5) Main", player), lambda state: state.has("Unholy Cathedral (E3M5) - Blue skull key", player, 1)) - set_rule(world.get_entrance("Unholy Cathedral (E3M5) Yellow -> Unholy Cathedral (E3M5) Main", player), lambda state: + set_rule(multiworld.get_entrance("Unholy Cathedral (E3M5) Yellow -> Unholy Cathedral (E3M5) Main", player), lambda state: state.has("Unholy Cathedral (E3M5) - Yellow skull key", player, 1)) # Mt. Erebus (E3M6) - set_rule(world.get_entrance("Hub -> Mt. Erebus (E3M6) Main", player), lambda state: + set_rule(multiworld.get_entrance("Hub -> Mt. Erebus (E3M6) Main", player), lambda state: state.has("Mt. Erebus (E3M6)", player, 1) and state.has("Shotgun", player, 1) and state.has("Chaingun", player, 1)) - set_rule(world.get_entrance("Mt. Erebus (E3M6) Main -> Mt. Erebus (E3M6) Blue", player), lambda state: + set_rule(multiworld.get_entrance("Mt. Erebus (E3M6) Main -> Mt. Erebus (E3M6) Blue", player), lambda state: state.has("Mt. Erebus (E3M6) - Blue skull key", player, 1)) - set_rule(world.get_entrance("Mt. Erebus (E3M6) Blue -> Mt. Erebus (E3M6) Main", player), lambda state: + set_rule(multiworld.get_entrance("Mt. Erebus (E3M6) Blue -> Mt. Erebus (E3M6) Main", player), lambda state: state.has("Mt. Erebus (E3M6) - Blue skull key", player, 1)) # Limbo (E3M7) - set_rule(world.get_entrance("Hub -> Limbo (E3M7) Main", player), lambda state: + set_rule(multiworld.get_entrance("Hub -> Limbo (E3M7) Main", player), lambda state: (state.has("Limbo (E3M7)", player, 1) and state.has("Shotgun", player, 1) and state.has("Chaingun", player, 1)) and (state.has("Rocket launcher", player, 1) or state.has("Plasma gun", player, 1) or state.has("BFG9000", player, 1))) - set_rule(world.get_entrance("Limbo (E3M7) Main -> Limbo (E3M7) Red", player), lambda state: + set_rule(multiworld.get_entrance("Limbo (E3M7) Main -> Limbo (E3M7) Red", player), lambda state: state.has("Limbo (E3M7) - Red skull key", player, 1)) - set_rule(world.get_entrance("Limbo (E3M7) Main -> Limbo (E3M7) Blue", player), lambda state: + set_rule(multiworld.get_entrance("Limbo (E3M7) Main -> Limbo (E3M7) Blue", player), lambda state: state.has("Limbo (E3M7) - Blue skull key", player, 1)) - set_rule(world.get_entrance("Limbo (E3M7) Main -> Limbo (E3M7) Pink", player), lambda state: + set_rule(multiworld.get_entrance("Limbo (E3M7) Main -> Limbo (E3M7) Pink", player), lambda state: state.has("Limbo (E3M7) - Blue skull key", player, 1)) - set_rule(world.get_entrance("Limbo (E3M7) Red -> Limbo (E3M7) Yellow", player), lambda state: + set_rule(multiworld.get_entrance("Limbo (E3M7) Red -> Limbo (E3M7) Yellow", player), lambda state: state.has("Limbo (E3M7) - Yellow skull key", player, 1)) - set_rule(world.get_entrance("Limbo (E3M7) Pink -> Limbo (E3M7) Green", player), lambda state: + set_rule(multiworld.get_entrance("Limbo (E3M7) Pink -> Limbo (E3M7) Green", player), lambda state: state.has("Limbo (E3M7) - Red skull key", player, 1)) # Dis (E3M8) - set_rule(world.get_entrance("Hub -> Dis (E3M8) Main", player), lambda state: + set_rule(multiworld.get_entrance("Hub -> Dis (E3M8) Main", player), lambda state: (state.has("Dis (E3M8)", player, 1) and state.has("Chaingun", player, 1) and state.has("Shotgun", player, 1)) and @@ -371,129 +376,129 @@ def set_episode3_rules(player, world, pro): state.has("Rocket launcher", player, 1))) # Warrens (E3M9) - set_rule(world.get_entrance("Hub -> Warrens (E3M9) Main", player), lambda state: + set_rule(multiworld.get_entrance("Hub -> Warrens (E3M9) Main", player), lambda state: (state.has("Warrens (E3M9)", player, 1) and state.has("Shotgun", player, 1) and state.has("Chaingun", player, 1) and state.has("Plasma gun", player, 1)) and (state.has("Rocket launcher", player, 1) or state.has("BFG9000", player, 1))) - set_rule(world.get_entrance("Warrens (E3M9) Main -> Warrens (E3M9) Blue", player), lambda state: + set_rule(multiworld.get_entrance("Warrens (E3M9) Main -> Warrens (E3M9) Blue", player), lambda state: state.has("Warrens (E3M9) - Blue skull key", player, 1)) - set_rule(world.get_entrance("Warrens (E3M9) Main -> Warrens (E3M9) Blue trigger", player), lambda state: + set_rule(multiworld.get_entrance("Warrens (E3M9) Main -> Warrens (E3M9) Blue trigger", player), lambda state: state.has("Warrens (E3M9) - Blue skull key", player, 1)) - set_rule(world.get_entrance("Warrens (E3M9) Blue -> Warrens (E3M9) Main", player), lambda state: + set_rule(multiworld.get_entrance("Warrens (E3M9) Blue -> Warrens (E3M9) Main", player), lambda state: state.has("Warrens (E3M9) - Blue skull key", player, 1)) - set_rule(world.get_entrance("Warrens (E3M9) Blue -> Warrens (E3M9) Red", player), lambda state: + set_rule(multiworld.get_entrance("Warrens (E3M9) Blue -> Warrens (E3M9) Red", player), lambda state: state.has("Warrens (E3M9) - Red skull key", player, 1)) -def set_episode4_rules(player, world, pro): +def set_episode4_rules(player, multiworld, pro): # Hell Beneath (E4M1) - set_rule(world.get_entrance("Hub -> Hell Beneath (E4M1) Main", player), lambda state: + set_rule(multiworld.get_entrance("Hub -> Hell Beneath (E4M1) Main", player), lambda state: state.has("Hell Beneath (E4M1)", player, 1)) - set_rule(world.get_entrance("Hell Beneath (E4M1) Main -> Hell Beneath (E4M1) Red", player), lambda state: + set_rule(multiworld.get_entrance("Hell Beneath (E4M1) Main -> Hell Beneath (E4M1) Red", player), lambda state: (state.has("Hell Beneath (E4M1) - Red skull key", player, 1) and state.has("Shotgun", player, 1) and state.has("Chaingun", player, 1)) and (state.has("Plasma gun", player, 1) or state.has("BFG9000", player, 1))) - set_rule(world.get_entrance("Hell Beneath (E4M1) Main -> Hell Beneath (E4M1) Blue", player), lambda state: + set_rule(multiworld.get_entrance("Hell Beneath (E4M1) Main -> Hell Beneath (E4M1) Blue", player), lambda state: state.has("Shotgun", player, 1) or state.has("Chaingun", player, 1) or state.has("Hell Beneath (E4M1) - Blue skull key", player, 1)) # Perfect Hatred (E4M2) - set_rule(world.get_entrance("Hub -> Perfect Hatred (E4M2) Main", player), lambda state: + set_rule(multiworld.get_entrance("Hub -> Perfect Hatred (E4M2) Main", player), lambda state: (state.has("Perfect Hatred (E4M2)", player, 1) and state.has("Shotgun", player, 1) and state.has("Chaingun", player, 1)) and (state.has("Rocket launcher", player, 1) or state.has("Plasma gun", player, 1) or state.has("BFG9000", player, 1))) - set_rule(world.get_entrance("Perfect Hatred (E4M2) Main -> Perfect Hatred (E4M2) Blue", player), lambda state: + set_rule(multiworld.get_entrance("Perfect Hatred (E4M2) Main -> Perfect Hatred (E4M2) Blue", player), lambda state: state.has("Perfect Hatred (E4M2) - Blue skull key", player, 1)) - set_rule(world.get_entrance("Perfect Hatred (E4M2) Main -> Perfect Hatred (E4M2) Yellow", player), lambda state: + set_rule(multiworld.get_entrance("Perfect Hatred (E4M2) Main -> Perfect Hatred (E4M2) Yellow", player), lambda state: state.has("Perfect Hatred (E4M2) - Yellow skull key", player, 1)) # Sever the Wicked (E4M3) - set_rule(world.get_entrance("Hub -> Sever the Wicked (E4M3) Main", player), lambda state: + set_rule(multiworld.get_entrance("Hub -> Sever the Wicked (E4M3) Main", player), lambda state: (state.has("Sever the Wicked (E4M3)", player, 1) and state.has("Shotgun", player, 1) and state.has("Chaingun", player, 1)) and (state.has("Rocket launcher", player, 1) or state.has("Plasma gun", player, 1) or state.has("BFG9000", player, 1))) - set_rule(world.get_entrance("Sever the Wicked (E4M3) Main -> Sever the Wicked (E4M3) Red", player), lambda state: + set_rule(multiworld.get_entrance("Sever the Wicked (E4M3) Main -> Sever the Wicked (E4M3) Red", player), lambda state: state.has("Sever the Wicked (E4M3) - Red skull key", player, 1)) - set_rule(world.get_entrance("Sever the Wicked (E4M3) Red -> Sever the Wicked (E4M3) Blue", player), lambda state: + set_rule(multiworld.get_entrance("Sever the Wicked (E4M3) Red -> Sever the Wicked (E4M3) Blue", player), lambda state: state.has("Sever the Wicked (E4M3) - Blue skull key", player, 1)) - set_rule(world.get_entrance("Sever the Wicked (E4M3) Red -> Sever the Wicked (E4M3) Main", player), lambda state: + set_rule(multiworld.get_entrance("Sever the Wicked (E4M3) Red -> Sever the Wicked (E4M3) Main", player), lambda state: state.has("Sever the Wicked (E4M3) - Red skull key", player, 1)) - set_rule(world.get_entrance("Sever the Wicked (E4M3) Blue -> Sever the Wicked (E4M3) Red", player), lambda state: + set_rule(multiworld.get_entrance("Sever the Wicked (E4M3) Blue -> Sever the Wicked (E4M3) Red", player), lambda state: state.has("Sever the Wicked (E4M3) - Blue skull key", player, 1)) # Unruly Evil (E4M4) - set_rule(world.get_entrance("Hub -> Unruly Evil (E4M4) Main", player), lambda state: + set_rule(multiworld.get_entrance("Hub -> Unruly Evil (E4M4) Main", player), lambda state: (state.has("Unruly Evil (E4M4)", player, 1) and state.has("Shotgun", player, 1) and state.has("Chaingun", player, 1)) and (state.has("Rocket launcher", player, 1) or state.has("Plasma gun", player, 1) or state.has("BFG9000", player, 1))) - set_rule(world.get_entrance("Unruly Evil (E4M4) Main -> Unruly Evil (E4M4) Red", player), lambda state: + set_rule(multiworld.get_entrance("Unruly Evil (E4M4) Main -> Unruly Evil (E4M4) Red", player), lambda state: state.has("Unruly Evil (E4M4) - Red skull key", player, 1)) # They Will Repent (E4M5) - set_rule(world.get_entrance("Hub -> They Will Repent (E4M5) Main", player), lambda state: + set_rule(multiworld.get_entrance("Hub -> They Will Repent (E4M5) Main", player), lambda state: (state.has("They Will Repent (E4M5)", player, 1) and state.has("Shotgun", player, 1) and state.has("Chaingun", player, 1)) and (state.has("Rocket launcher", player, 1) or state.has("Plasma gun", player, 1) or state.has("BFG9000", player, 1))) - set_rule(world.get_entrance("They Will Repent (E4M5) Main -> They Will Repent (E4M5) Red", player), lambda state: + set_rule(multiworld.get_entrance("They Will Repent (E4M5) Main -> They Will Repent (E4M5) Red", player), lambda state: state.has("They Will Repent (E4M5) - Red skull key", player, 1)) - set_rule(world.get_entrance("They Will Repent (E4M5) Red -> They Will Repent (E4M5) Main", player), lambda state: + set_rule(multiworld.get_entrance("They Will Repent (E4M5) Red -> They Will Repent (E4M5) Main", player), lambda state: state.has("They Will Repent (E4M5) - Red skull key", player, 1)) - set_rule(world.get_entrance("They Will Repent (E4M5) Red -> They Will Repent (E4M5) Yellow", player), lambda state: + set_rule(multiworld.get_entrance("They Will Repent (E4M5) Red -> They Will Repent (E4M5) Yellow", player), lambda state: state.has("They Will Repent (E4M5) - Yellow skull key", player, 1)) - set_rule(world.get_entrance("They Will Repent (E4M5) Red -> They Will Repent (E4M5) Blue", player), lambda state: + set_rule(multiworld.get_entrance("They Will Repent (E4M5) Red -> They Will Repent (E4M5) Blue", player), lambda state: state.has("They Will Repent (E4M5) - Blue skull key", player, 1)) # Against Thee Wickedly (E4M6) - set_rule(world.get_entrance("Hub -> Against Thee Wickedly (E4M6) Main", player), lambda state: + set_rule(multiworld.get_entrance("Hub -> Against Thee Wickedly (E4M6) Main", player), lambda state: (state.has("Against Thee Wickedly (E4M6)", player, 1) and state.has("Shotgun", player, 1) and state.has("Chaingun", player, 1)) and (state.has("Rocket launcher", player, 1) or state.has("Plasma gun", player, 1) or state.has("BFG9000", player, 1))) - set_rule(world.get_entrance("Against Thee Wickedly (E4M6) Main -> Against Thee Wickedly (E4M6) Blue", player), lambda state: + set_rule(multiworld.get_entrance("Against Thee Wickedly (E4M6) Main -> Against Thee Wickedly (E4M6) Blue", player), lambda state: state.has("Against Thee Wickedly (E4M6) - Blue skull key", player, 1)) - set_rule(world.get_entrance("Against Thee Wickedly (E4M6) Blue -> Against Thee Wickedly (E4M6) Yellow", player), lambda state: + set_rule(multiworld.get_entrance("Against Thee Wickedly (E4M6) Blue -> Against Thee Wickedly (E4M6) Yellow", player), lambda state: state.has("Against Thee Wickedly (E4M6) - Yellow skull key", player, 1)) - set_rule(world.get_entrance("Against Thee Wickedly (E4M6) Blue -> Against Thee Wickedly (E4M6) Red", player), lambda state: + set_rule(multiworld.get_entrance("Against Thee Wickedly (E4M6) Blue -> Against Thee Wickedly (E4M6) Red", player), lambda state: state.has("Against Thee Wickedly (E4M6) - Red skull key", player, 1)) # And Hell Followed (E4M7) - set_rule(world.get_entrance("Hub -> And Hell Followed (E4M7) Main", player), lambda state: + set_rule(multiworld.get_entrance("Hub -> And Hell Followed (E4M7) Main", player), lambda state: (state.has("And Hell Followed (E4M7)", player, 1) and state.has("Shotgun", player, 1) and state.has("Chaingun", player, 1)) and (state.has("Rocket launcher", player, 1) or state.has("Plasma gun", player, 1) or state.has("BFG9000", player, 1))) - set_rule(world.get_entrance("And Hell Followed (E4M7) Main -> And Hell Followed (E4M7) Blue", player), lambda state: + set_rule(multiworld.get_entrance("And Hell Followed (E4M7) Main -> And Hell Followed (E4M7) Blue", player), lambda state: state.has("And Hell Followed (E4M7) - Blue skull key", player, 1)) - set_rule(world.get_entrance("And Hell Followed (E4M7) Main -> And Hell Followed (E4M7) Red", player), lambda state: + set_rule(multiworld.get_entrance("And Hell Followed (E4M7) Main -> And Hell Followed (E4M7) Red", player), lambda state: state.has("And Hell Followed (E4M7) - Red skull key", player, 1)) - set_rule(world.get_entrance("And Hell Followed (E4M7) Main -> And Hell Followed (E4M7) Yellow", player), lambda state: + set_rule(multiworld.get_entrance("And Hell Followed (E4M7) Main -> And Hell Followed (E4M7) Yellow", player), lambda state: state.has("And Hell Followed (E4M7) - Yellow skull key", player, 1)) - set_rule(world.get_entrance("And Hell Followed (E4M7) Red -> And Hell Followed (E4M7) Main", player), lambda state: + set_rule(multiworld.get_entrance("And Hell Followed (E4M7) Red -> And Hell Followed (E4M7) Main", player), lambda state: state.has("And Hell Followed (E4M7) - Red skull key", player, 1)) # Unto the Cruel (E4M8) - set_rule(world.get_entrance("Hub -> Unto the Cruel (E4M8) Main", player), lambda state: + set_rule(multiworld.get_entrance("Hub -> Unto the Cruel (E4M8) Main", player), lambda state: (state.has("Unto the Cruel (E4M8)", player, 1) and state.has("Chainsaw", player, 1) and state.has("Shotgun", player, 1) and @@ -501,37 +506,37 @@ def set_episode4_rules(player, world, pro): state.has("Rocket launcher", player, 1)) and (state.has("BFG9000", player, 1) or state.has("Plasma gun", player, 1))) - set_rule(world.get_entrance("Unto the Cruel (E4M8) Main -> Unto the Cruel (E4M8) Red", player), lambda state: + set_rule(multiworld.get_entrance("Unto the Cruel (E4M8) Main -> Unto the Cruel (E4M8) Red", player), lambda state: state.has("Unto the Cruel (E4M8) - Red skull key", player, 1)) - set_rule(world.get_entrance("Unto the Cruel (E4M8) Main -> Unto the Cruel (E4M8) Yellow", player), lambda state: + set_rule(multiworld.get_entrance("Unto the Cruel (E4M8) Main -> Unto the Cruel (E4M8) Yellow", player), lambda state: state.has("Unto the Cruel (E4M8) - Yellow skull key", player, 1)) - set_rule(world.get_entrance("Unto the Cruel (E4M8) Main -> Unto the Cruel (E4M8) Orange", player), lambda state: + set_rule(multiworld.get_entrance("Unto the Cruel (E4M8) Main -> Unto the Cruel (E4M8) Orange", player), lambda state: state.has("Unto the Cruel (E4M8) - Yellow skull key", player, 1) and state.has("Unto the Cruel (E4M8) - Red skull key", player, 1)) # Fear (E4M9) - set_rule(world.get_entrance("Hub -> Fear (E4M9) Main", player), lambda state: + set_rule(multiworld.get_entrance("Hub -> Fear (E4M9) Main", player), lambda state: state.has("Fear (E4M9)", player, 1) and state.has("Shotgun", player, 1) and state.has("Chaingun", player, 1) and state.has("Rocket launcher", player, 1) and state.has("Plasma gun", player, 1) and state.has("BFG9000", player, 1)) - set_rule(world.get_entrance("Fear (E4M9) Main -> Fear (E4M9) Yellow", player), lambda state: + set_rule(multiworld.get_entrance("Fear (E4M9) Main -> Fear (E4M9) Yellow", player), lambda state: state.has("Fear (E4M9) - Yellow skull key", player, 1)) - set_rule(world.get_entrance("Fear (E4M9) Yellow -> Fear (E4M9) Main", player), lambda state: + set_rule(multiworld.get_entrance("Fear (E4M9) Yellow -> Fear (E4M9) Main", player), lambda state: state.has("Fear (E4M9) - Yellow skull key", player, 1)) def set_rules(doom_1993_world: "DOOM1993World", included_episodes, pro): player = doom_1993_world.player - world = doom_1993_world.multiworld + multiworld = doom_1993_world.multiworld if included_episodes[0]: - set_episode1_rules(player, world, pro) + set_episode1_rules(player, multiworld, pro) if included_episodes[1]: - set_episode2_rules(player, world, pro) + set_episode2_rules(player, multiworld, pro) if included_episodes[2]: - set_episode3_rules(player, world, pro) + set_episode3_rules(player, multiworld, pro) if included_episodes[3]: - set_episode4_rules(player, world, pro) + set_episode4_rules(player, multiworld, pro) diff --git a/worlds/doom_1993/__init__.py b/worlds/doom_1993/__init__.py index e420b34b4f00..828563150fed 100644 --- a/worlds/doom_1993/__init__.py +++ b/worlds/doom_1993/__init__.py @@ -2,9 +2,10 @@ import logging from typing import Any, Dict, List -from BaseClasses import Entrance, CollectionState, Item, ItemClassification, Location, MultiWorld, Region, Tutorial +from BaseClasses import Entrance, CollectionState, Item, Location, MultiWorld, Region, Tutorial from worlds.AutoWorld import WebWorld, World -from . import Items, Locations, Maps, Options, Regions, Rules +from . import Items, Locations, Maps, Regions, Rules +from .Options import DOOM1993Options logger = logging.getLogger("DOOM 1993") @@ -37,7 +38,8 @@ class DOOM1993World(World): Developed by id Software, and originally released in 1993, DOOM pioneered and popularized the first-person shooter, setting a standard for all FPS games. """ - option_definitions = Options.options + options_dataclass = DOOM1993Options + options: DOOM1993Options game = "DOOM 1993" web = DOOM1993Web() data_version = 3 @@ -78,26 +80,28 @@ class DOOM1993World(World): "Energy cell pack": 10 } - def __init__(self, world: MultiWorld, player: int): + def __init__(self, multiworld: MultiWorld, player: int): self.included_episodes = [1, 1, 1, 0] self.location_count = 0 - super().__init__(world, player) + super().__init__(multiworld, player) def get_episode_count(self): return functools.reduce(lambda count, episode: count + episode, self.included_episodes) def generate_early(self): # Cache which episodes are included - for i in range(4): - self.included_episodes[i] = getattr(self.multiworld, f"episode{i + 1}")[self.player].value + self.included_episodes[0] = self.options.episode1.value + self.included_episodes[1] = self.options.episode2.value + self.included_episodes[2] = self.options.episode3.value + self.included_episodes[3] = self.options.episode4.value # If no episodes selected, select Episode 1 if self.get_episode_count() == 0: self.included_episodes[0] = 1 def create_regions(self): - pro = getattr(self.multiworld, "pro")[self.player].value + pro = self.options.pro.value # Main regions menu_region = Region("Menu", self.player, self.multiworld) @@ -148,7 +152,7 @@ def create_regions(self): def completion_rule(self, state: CollectionState): goal_levels = Maps.map_names - if getattr(self.multiworld, "goal")[self.player].value: + if self.options.goal.value: goal_levels = self.boss_level_for_espidoes for map_name in goal_levels: @@ -167,8 +171,8 @@ def completion_rule(self, state: CollectionState): return True def set_rules(self): - pro = getattr(self.multiworld, "pro")[self.player].value - allow_death_logic = getattr(self.multiworld, "allow_death_logic")[self.player].value + pro = self.options.pro.value + allow_death_logic = self.options.allow_death_logic.value Rules.set_rules(self, self.included_episodes, pro) self.multiworld.completion_condition[self.player] = lambda state: self.completion_rule(state) @@ -185,7 +189,7 @@ def create_item(self, name: str) -> DOOM1993Item: def create_items(self): itempool: List[DOOM1993Item] = [] - start_with_computer_area_maps: bool = getattr(self.multiworld, "start_with_computer_area_maps")[self.player].value + start_with_computer_area_maps: bool = self.options.start_with_computer_area_maps.value # Items for item_id, item in Items.item_table.items(): @@ -225,7 +229,7 @@ def create_items(self): self.multiworld.push_precollected(self.create_item(self.starting_level_for_episode[i])) # Give Computer area maps if option selected - if getattr(self.multiworld, "start_with_computer_area_maps")[self.player].value: + if self.options.start_with_computer_area_maps.value: for item_id, item_dict in Items.item_table.items(): item_episode = item_dict["episode"] if item_episode > 0: @@ -269,7 +273,7 @@ def create_ratioed_items(self, item_name: str, itempool: List[DOOM1993Item]): itempool.append(self.create_item(item_name)) def fill_slot_data(self) -> Dict[str, Any]: - slot_data = {name: getattr(self.multiworld, name)[self.player].value for name in self.option_definitions} + slot_data = self.options.as_dict("goal", "difficulty", "random_monsters", "random_pickups", "random_music", "flip_levels", "allow_death_logic", "pro", "start_with_computer_area_maps", "death_link", "reset_level_on_death", "episode1", "episode2", "episode3", "episode4") # E2M6 and E3M9 each have one way keydoor. You can enter, but required the keycard to get out. # We used to force place the keycard behind those doors. Limiting the randomness for those items. A change diff --git a/worlds/doom_1993/docs/setup_en.md b/worlds/doom_1993/docs/setup_en.md index 1e546d359c91..8906efac9cea 100644 --- a/worlds/doom_1993/docs/setup_en.md +++ b/worlds/doom_1993/docs/setup_en.md @@ -15,7 +15,7 @@ 1. Download [APDOOM.zip](https://github.com/Daivuk/apdoom/releases) and extract it. 2. Copy `DOOM.WAD` from your game's installation directory into the newly extracted folder. You can find the folder in steam by finding the game in your library, - right-clicking it and choosing **Manage -> Browse Local Files**. + right-clicking it and choosing **Manage -> Browse Local Files**. The WAD file is in the `/base/` folder. ## Joining a MultiWorld Game From 233eba6681fbbeb1ba56f5fb7bcf80585f6bbd5a Mon Sep 17 00:00:00 2001 From: el-u <109771707+el-u@users.noreply.github.com> Date: Thu, 18 Apr 2024 18:56:32 +0200 Subject: [PATCH 084/153] lufia2ac: prevent double checks (#3154) --- worlds/lufia2ac/basepatch/basepatch.asm | 6 +++--- worlds/lufia2ac/basepatch/basepatch.bsdiff4 | Bin 8836 -> 8865 bytes 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/worlds/lufia2ac/basepatch/basepatch.asm b/worlds/lufia2ac/basepatch/basepatch.asm index f25d4deada10..77809cce6f4c 100644 --- a/worlds/lufia2ac/basepatch/basepatch.asm +++ b/worlds/lufia2ac/basepatch/basepatch.asm @@ -145,7 +145,7 @@ TX: BEQ + JSR ReportLocationCheck SEP #$20 - JML $8EC331 ; skip item get process + JML $8EC2DC ; skip item get process; consider chest emptied +: BIT.w #$4200 ; test for blue chest flag BEQ + LDA $F02048 ; load total blue chests checked @@ -155,7 +155,7 @@ TX: INC ; increment check counter STA $F02040 ; store check counter SEP #$20 - JML $8EC331 ; skip item get process + JML $8EC2DC ; skip item get process; consider chest emptied +: SEP #$20 JML $8EC1EF ; continue item get process @@ -952,7 +952,7 @@ Shop: STZ $05A9 PHB PHP - JML $80A33A ; open shop menu + JML $80A33A ; open shop menu (eventually causes return by reaching existing PLP : PLB : RTL at $809DB0) +: RTL ; shop item select diff --git a/worlds/lufia2ac/basepatch/basepatch.bsdiff4 b/worlds/lufia2ac/basepatch/basepatch.bsdiff4 index 1dfade445e14a4e01e4f5fc1c598f1ffbab67f2d..b261f9d1ab970954903abfc7841ef6b6de865e25 100644 GIT binary patch delta 8571 zcmV->A%xz9MWICzLQ_OZMn*I+5di=I00000qOlPw0R(7EE02>u0VjWM;qQPh#XD{D z-tV`a?$hY!uTJ&nUp{@;6dz8G`|NLdSJ|I^@2h?FEtMXeeRYGfD z5t4e7^z}`uen0|xX)=GFJrz8sqt!i?KT+v5JvB7msqF?$N2-35*dWx=6HOCMG&G)( zw4Ojrr=uz0&faZAYZY#-P(9Lr+k` z4I5JKjwqk)}cA9--3l zM0#pzwH{M6jW&=QQyK)(qXGtv0MIlvGzOXg4Kx^l4H{(70i#U@Kr{dWpfn8)27^qg zqeu{$LE}m4N2Gu9ntD%2{U~{=dY-15XwdZ@Q`GW-k)zaUpc;CO4IYR98Z-f;LFx}v zAO=8W27u59s4@c}dWM0JXaLY8Q3wf;ntDuvZA{Y$X{vsv7=<^gZ8oQ*WYqm3Jx>(y zqerNEo}Q`c0Mlw|=^G%$Gf?$BplBK%C^n-(ra&@!k5GTe4U{xJ8bPBYO%G7h5$F3m zf$|5B&oCVvFZu|j5(^9R-KFy*m-IY^4p?^#Pdc@x0S1NNiK~@5a=pz+dVl!awmGC%IA9kC4odn&bbpOxuck>16!f6W$J)FcOOP?lYUcm&vaokjuvQ70VPgT_C zWaje*1y_HjutJWNP&XTm6?fZt-Pz-tVB#)n*qWSZ&c&jB-d@hge%lkzedTM~W@6d@ z6B%fiVRR8t7%b~>?GoA-x?2Y3iVP?MYGgtR3-v8hdB9K^CxXgy$8RD~wM0O9GT5d5 z#GfYC0KjdKYLOMgI-VWdc$U=aBLsTXb`5g}cZHgKgJfyF*<%cs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|*@fC9Z+wL$bl*g=MS*dt-$l4Bg_u zm(TCm%RKxswoF|h)*%9QS@dN~UYOs;Lt*qt)cE>;JlZsjVJTlIqpu{wmJq@|TI*{k zM>OvaOcWzl*D%B{%4iFeWJYWyV+Bd{5}W{&Czj8a@LA5Zx3w{!s47bEA?^1u7!+ty zD2&O;B6WXu~!WKS{lmOF;uqLcvguc?{Lb{ZUTr>8=@$;rlsd^=#?uyM*5n4ZIY3c zSbZcfimH#m{1suVS6Re?23)301?+-w8fc0SB3u1to~=ld4Xljx>CY(eUP54d_71hx^LJ){l z&`xun5|hU{&UlD|0BUvDU3qwP_xP`WX62kigs3#rO)Rp@J)yd)x!640sn?NZYb7Mt zr;x%OR?HE^FVIOkg6C5N5-YIl(jB{YyEUo_4s)LVc>y{KD4(=Nfm?01<3|Rg#WZ<` z)Cx?43^2jjL==Yj=~GTs`sf}aG`!(|Rk^VUGKePtVgWxWES4ggDtqYnTnQBf z800}KZ|7JB4-?ZOE+OHR3%2-wXi@$jRl=h0FR*d>djR;XzcVWiPF4dLZPMw?P55;# z-bCnCXI%Djv+j2xVQ!}{Xe%33Uz z+7mlf0k?V6h`6_2eh$ zFg{saA%TM^1=wqu#5ENA;I?I!321?9rJ0;BE$I^B`|xHNZUDr{54MuNSK%_IbO>y9 zAG)n0-rfSLF*;rKn+elkiy*9js|&3wSr&3gH3Y#R zQ?*3h1tbAmfsoo3)t%!;-WFRfA-{Yoi5m_#K>?xR? zwN Date: Thu, 18 Apr 2024 18:57:22 +0200 Subject: [PATCH 085/153] The Witness: Make item links work properly with the hint system (#3110) --- worlds/witness/hints.py | 23 ++++++++++++++++------- 1 file changed, 16 insertions(+), 7 deletions(-) diff --git a/worlds/witness/hints.py b/worlds/witness/hints.py index 28631438938e..fa6f658b451d 100644 --- a/worlds/witness/hints.py +++ b/worlds/witness/hints.py @@ -2,7 +2,7 @@ from dataclasses import dataclass from typing import TYPE_CHECKING, Dict, List, Optional, Set, Tuple, Union -from BaseClasses import CollectionState, Item, Location, LocationProgressType +from BaseClasses import CollectionState, Item, Location, LocationProgressType, MultiWorld from .data import static_logic as static_witness_logic from .data.utils import weighted_sample @@ -184,17 +184,26 @@ def word_direct_hint(world: "WitnessWorld", hint: WitnessLocationHint) -> Witnes def hint_from_item(world: "WitnessWorld", item_name: str, own_itempool: List[Item]) -> Optional[WitnessLocationHint]: - - locations = [item.location for item in own_itempool if item.name == item_name and item.location] + def get_real_location(multiworld: MultiWorld, location: Location): + """If this location is from an item_link pseudo-world, get the location that the item_link item is on. + Return the original location otherwise / as a fallback.""" + if location.player not in world.multiworld.groups: + return location + + try: + return multiworld.find_item(location.item.name, location.player) + except StopIteration: + return location + + locations = [ + get_real_location(world.multiworld, item.location) + for item in own_itempool if item.name == item_name and item.location + ] if not locations: return None location_obj = world.random.choice(locations) - location_name = location_obj.name - - if location_obj.player != world.player: - location_name += " (" + world.multiworld.get_player_name(location_obj.player) + ")" return WitnessLocationHint(location_obj, False) From 580c9c3943fadb5efac87ae7343dc3b4b002b98a Mon Sep 17 00:00:00 2001 From: Aaron Wagener Date: Thu, 18 Apr 2024 11:58:18 -0500 Subject: [PATCH 086/153] Core: fix item_name_groups unfolding in item links (#3088) --- Options.py | 1 + test/general/test_options.py | 30 ++++++++++++++++++++++++++++++ 2 files changed, 31 insertions(+) diff --git a/Options.py b/Options.py index 3b1cdc6e2b62..65affb8d250e 100644 --- a/Options.py +++ b/Options.py @@ -1124,6 +1124,7 @@ def verify(self, world: typing.Type[World], player_name: str, plando_options: "P raise Exception(f"item_link {link['name']} has {intersection} " f"items in both its local_items and non_local_items pool.") link.setdefault("link_replacement", None) + link["item_pool"] = list(pool) class Removed(FreeText): diff --git a/test/general/test_options.py b/test/general/test_options.py index 211704dfe6ba..6cf642029e65 100644 --- a/test/general/test_options.py +++ b/test/general/test_options.py @@ -1,4 +1,7 @@ import unittest + +from BaseClasses import PlandoOptions +from Options import ItemLinks from worlds.AutoWorld import AutoWorldRegister @@ -17,3 +20,30 @@ def test_options_are_not_set_by_world(self): with self.subTest(game=gamename): self.assertFalse(hasattr(world_type, "options"), f"Unexpected assignment to {world_type.__name__}.options!") + + def test_item_links_name_groups(self): + """Tests that item links successfully unfold item_name_groups""" + item_link_groups = [ + [{ + "name": "ItemLinkGroup", + "item_pool": ["Everything"], + "link_replacement": False, + "replacement_item": None, + }], + [{ + "name": "ItemLinkGroup", + "item_pool": ["Hammer", "Bow"], + "link_replacement": False, + "replacement_item": None, + }] + ] + # we really need some sort of test world but generic doesn't have enough items for this + world = AutoWorldRegister.world_types["A Link to the Past"] + plando_options = PlandoOptions.from_option_string("bosses") + item_links = [ItemLinks.from_any(item_link_groups[0]), ItemLinks.from_any(item_link_groups[1])] + for link in item_links: + link.verify(world, "tester", plando_options) + self.assertIn("Hammer", link.value[0]["item_pool"]) + self.assertIn("Bow", link.value[0]["item_pool"]) + + # TODO test that the group created using these options has the items From 5711d2c30926b393682eb7110ef205974fc76e39 Mon Sep 17 00:00:00 2001 From: Aaron Wagener Date: Thu, 18 Apr 2024 11:59:30 -0500 Subject: [PATCH 087/153] The Messenger: Hotfix item links filler gen (#3078) --- worlds/messenger/__init__.py | 23 ++++++++++++++++------- worlds/messenger/connections.py | 18 +++++++++--------- worlds/messenger/options.py | 5 +---- 3 files changed, 26 insertions(+), 20 deletions(-) diff --git a/worlds/messenger/__init__.py b/worlds/messenger/__init__.py index 5e1b12778638..21a2fa6ede58 100644 --- a/worlds/messenger/__init__.py +++ b/worlds/messenger/__init__.py @@ -1,6 +1,5 @@ import logging -from datetime import date -from typing import Any, ClassVar, Dict, List, Optional, TextIO +from typing import Any, ClassVar, Dict, List, Optional, Set, TextIO from BaseClasses import CollectionState, Entrance, Item, ItemClassification, MultiWorld, Tutorial from Options import Accessibility @@ -154,13 +153,12 @@ def generate_early(self) -> None: # TODO add a check for transition shuffle when that gets added back in if not self.options.shuffle_portals and "Searing Crags Portal" not in self.starting_portals: self.starting_portals.append("Searing Crags Portal") - if len(self.starting_portals) > 4: - portals_to_strip = [portal for portal in ["Riviere Turquoise Portal", "Sunken Shrine Portal"] - if portal in self.starting_portals] - self.starting_portals.remove(self.random.choice(portals_to_strip)) + portals_to_strip = [portal for portal in ["Riviere Turquoise Portal", "Sunken Shrine Portal"] + if portal in self.starting_portals] + self.starting_portals.remove(self.random.choice(portals_to_strip)) self.filler = FILLER.copy() - if (not hasattr(self.options, "traps") and date.today() < date(2024, 4, 2)) or self.options.traps: + if self.options.traps: self.filler.update(TRAPS) self.plando_portals = [] @@ -350,6 +348,17 @@ 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: + group = super().create_group(multiworld, new_player_id, players) + assert isinstance(group, MessengerWorld) + + group.filler = FILLER.copy() + group.options.traps.value = all(multiworld.worlds[player].options.traps for player in players) + if group.options.traps: + group.filler.update(TRAPS) + return group + def collect(self, state: "CollectionState", item: "Item") -> bool: change = super().collect(state, item) if change and "Time Shard" in item.name: diff --git a/worlds/messenger/connections.py b/worlds/messenger/connections.py index 5e1871e287d2..978917c555e1 100644 --- a/worlds/messenger/connections.py +++ b/worlds/messenger/connections.py @@ -567,15 +567,6 @@ "Elemental Skylands - Earth Generator Shop", ], "Earth Generator Shop": [ - "Elemental Skylands - Fire Shmup", - ], - "Fire Shmup": [ - "Elemental Skylands - Fire Intro Shop", - ], - "Fire Intro Shop": [ - "Elemental Skylands - Fire Generator Shop", - ], - "Fire Generator Shop": [ "Elemental Skylands - Water Shmup", ], "Water Shmup": [ @@ -585,6 +576,15 @@ "Elemental Skylands - Water Generator Shop", ], "Water Generator Shop": [ + "Elemental Skylands - Fire Shmup", + ], + "Fire Shmup": [ + "Elemental Skylands - Fire Intro Shop", + ], + "Fire Intro Shop": [ + "Elemental Skylands - Fire Generator Shop", + ], + "Fire Generator Shop": [ "Elemental Skylands - Right", ], "Right": [ diff --git a/worlds/messenger/options.py b/worlds/messenger/options.py index 990975a926f9..0d8fcf4da55f 100644 --- a/worlds/messenger/options.py +++ b/worlds/messenger/options.py @@ -1,5 +1,4 @@ from dataclasses import dataclass -from datetime import date from typing import Dict from schema import And, Optional, Or, Schema @@ -203,8 +202,6 @@ class MessengerOptions(DeathLinkMixin, PerGameCommonOptions): notes_needed: NotesNeeded total_seals: AmountSeals percent_seals_required: RequiredSeals + traps: Traps shop_price: ShopPrices shop_price_plan: PlannedShopPrices - - if date.today() > date(2024, 4, 1): - traps: Traps From c4c4069022015ffe5088e39661a5a31e5226fcb2 Mon Sep 17 00:00:00 2001 From: PoryGone <98504756+PoryGone@users.noreply.github.com> Date: Thu, 18 Apr 2024 13:00:01 -0400 Subject: [PATCH 088/153] SA2B: Update Setup guide for new Mod Manager (#3085) --- worlds/sa2b/Options.py | 3 ++- worlds/sa2b/docs/setup_en.md | 48 +++++++++++++++++++++--------------- 2 files changed, 30 insertions(+), 21 deletions(-) diff --git a/worlds/sa2b/Options.py b/worlds/sa2b/Options.py index be001572849c..b2980426920a 100644 --- a/worlds/sa2b/Options.py +++ b/worlds/sa2b/Options.py @@ -227,7 +227,8 @@ class Omosanity(Toggle): class Animalsanity(Toggle): """ - Determines whether picking up counted small animals grants checks + Determines whether unique counts of animals grant checks. + ALL animals must be collected in a single run of a mission to get all checks. (421 Locations) """ display_name = "Animalsanity" diff --git a/worlds/sa2b/docs/setup_en.md b/worlds/sa2b/docs/setup_en.md index 2ac00a3fb834..354ef4bbe986 100644 --- a/worlds/sa2b/docs/setup_en.md +++ b/worlds/sa2b/docs/setup_en.md @@ -4,8 +4,8 @@ - Sonic Adventure 2: Battle from: [Sonic Adventure 2: Battle Steam Store Page](https://store.steampowered.com/app/213610/Sonic_Adventure_2/) - The Battle DLC is required if you choose to add Chao Karate locations to the randomizer -- Sonic Adventure 2 Mod Loader from: [Sonic Retro Mod Loader Page](http://info.sonicretro.org/SA2_Mod_Loader) -- Microsoft Visual C++ 2013 from: [Microsoft Visual C++ 2013 Redistributable Page](https://www.microsoft.com/en-us/download/details.aspx?id=40784) +- SA Mod Manager from: [SA Mod Manager GitHub Releases Page](https://github.com/X-Hax/SA-Mod-Manager/releases) +- .NET Desktop Runtime 7.0 from: [.NET Desktop Runtime 7.0 Download Page](https://dotnet.microsoft.com/en-us/download/dotnet/thank-you/runtime-desktop-7.0.9-windows-x64-installer) - Archipelago Mod for Sonic Adventure 2: Battle from: [Sonic Adventure 2: Battle Archipelago Randomizer Mod Releases Page](https://github.com/PoryGone/SA2B_Archipelago/releases/) @@ -15,6 +15,8 @@ - Sonic Adventure 2: Battle Archipelago PopTracker pack from: [SA2B AP Tracker Releases Page](https://github.com/PoryGone/SA2B_AP_Tracker/releases/) - Quality of life mods - SA2 Volume Controls from: [SA2 Volume Controls Release Page] (https://gamebanana.com/mods/381193) +- Sonic Adventure DX from: [Sonic Adventure DX Steam Store Page](https://store.steampowered.com/app/71250/Sonic_Adventure_DX/) + - For setting up the `SADX Music` option (See Additional Options for instructions). ## Installation Procedures (Windows) @@ -22,15 +24,13 @@ 2. Launch the game at least once without mods. -3. Install Sonic Adventure 2 Mod Loader as per its instructions. +3. Install SA Mod Manager as per [its instructions](https://github.com/X-Hax/SA-Mod-Manager/tree/master?tab=readme-ov-file). -4. The folder you installed the Sonic Adventure 2 Mod Loader into will now have a `/mods` directory. +4. Unpack the Archipelago Mod into the `/mods` directory in the folder into which you installed Sonic Adventure 2: Battle, so that `/mods/SA2B_Archipelago` is a valid path. -5. Unpack the Archipelago Mod into this folder, so that `/mods/SA2B_Archipelago` is a valid path. +5. In the SA2B_Archipelago folder, run the `CopyAPCppDLL.bat` script (a window will very quickly pop up and go away). -6. In the SA2B_Archipelago folder, run the `CopyAPCppDLL.bat` script (a window will very quickly pop up and go away). - -7. Launch the `SA2ModManager.exe` and make sure the SA2B_Archipelago mod is listed and enabled. +6. Launch the `SAModManager.exe` and make sure the SA2B_Archipelago mod is listed and enabled. ## Installation Procedures (Linux and Steam Deck) @@ -40,21 +40,29 @@ 3. Launch the game at least once without mods. -4. Install Sonic Adventure 2 Mod Loader as per its instructions. To launch it, add ``SA2ModManager.exe`` as a non-Steam game. In the properties on Steam for Sonic Adventure 2 Mod Loader, set it to use Proton as the compatibility tool. +4. Create both a `/mods` directory and a `/SAManager` directory in the folder into which you installed Sonic Adventure 2: Battle. + +5. Install SA Mod Manager as per [its instructions](https://github.com/X-Hax/SA-Mod-Manager/tree/master?tab=readme-ov-file). Specifically, extract SAModManager.exe file to the folder that Sonic Adventure 2: Battle is installed to. To launch it, add ``SAModManager.exe`` as a non-Steam game. In the properties on Steam for SA Mod Manager, set it to use Proton as the compatibility tool. + +6. Run SAModManager.exe from Steam once. It should produce an error popup for a missing dependency, close the error. + +7. Install protontricks, on the Steam Deck this can be done via the Discover store, on other distros instructions vary, [see its github page](https://github.com/Matoking/protontricks). + +8. Download the [.NET 7 Desktop Runtime for x64 Windows](https://dotnet.microsoft.com/en-us/download/dotnet/thank-you/runtime-desktop-7.0.17-windows-x64-installer}. If this link does not work, the download can be found on [this page](https://dotnet.microsoft.com/en-us/download/dotnet/7.0). -5. The folder you installed the Sonic Adventure 2 Mod Loader into will now have a `/mods` directory. +9. Right click the .NET 7 Desktop Runtime exe, and assuming protontricks was installed correctly, the option to "Open with Protontricks Launcher" should be available. Click that, and in the popup window that opens, select SAModManager.exe. Follow the prompts after this to install the .NET 7 Desktop Runtime for SAModManager. Once it is done, you should be able to successfully launch SAModManager to steam. 6. Unpack the Archipelago Mod into this folder, so that `/mods/SA2B_Archipelago` is a valid path. -7. In the SA2B_Archipelago folder, copy the `APCpp.dll` file and paste it in the Sonic Adventure 2 install folder (where `SA2ModManager.exe` is). +7. In the SA2B_Archipelago folder, copy the `APCpp.dll` file and paste it in the Sonic Adventure 2 install folder (where `sonic2app.exe` is). -8. Launch the `SA2ModManager.exe` from Steam and make sure the SA2B_Archipelago mod is listed and enabled. +8. Launch `SAModManager.exe` from Steam and make sure the SA2B_Archipelago mod is listed and enabled. -Note: Ensure that you launch Sonic Adventure 2 from Steam directly on Linux, rather than launching using the `Save & Play` button in Sonic Adventure 2 Mod Loader. +Note: Ensure that you launch Sonic Adventure 2 from Steam directly on Linux, rather than launching using the `Save & Play` button in SA Mod Manager. ## Joining a MultiWorld Game -1. Before launching the game, run the `SA2ModManager.exe`, select the SA2B_Archipelago mod, and hit the `Configure...` button. +1. Before launching the game, run the `SAModManager.exe`, select the SA2B_Archipelago mod, and hit the `Configure Mod` button. 2. For the `Server IP` field under `AP Settings`, enter the address of the server, such as archipelago.gg:38281, your server host should be able to tell you this. @@ -68,7 +76,7 @@ Note: Ensure that you launch Sonic Adventure 2 from Steam directly on Linux, rat ## Additional Options -Some additional settings related to the Archipelago messages in game can be adjusted in the SA2ModManager if you select `Configure...` on the SA2B_Archipelago mod. This settings will be under a `General Settings` tab. +Some additional settings related to the Archipelago messages in game can be adjusted in the SAModManager if you select `Configure Mod` on the SA2B_Archipelago mod. This settings will be under a `General Settings` tab. - Message Display Count: This is the maximum number of Archipelago messages that can be displayed on screen at any given time. - Message Display Duration: This dictates how long Archipelago messages are displayed on screen (in seconds). @@ -92,9 +100,9 @@ If you wish to use the `SADX Music` option of the Randomizer, you must own a cop - Game is running too fast (Like Sonic). - Limit framerate using the mod manager: - 1. Launch `SA2ModManager.exe`. - 2. Select the `Graphics` tab. - 3. Check the `Lock framerate` box under the Visuals section. + 1. Launch `SAModManager.exe`. + 2. Select the `Game Config` tab, then select the `Patches` subtab. + 3. Check the `Lock framerate` box under the Patches section. 4. Press the `Save` button. - If using an NVidia graphics card: 1. Open the NVIDIA Control Panel. @@ -105,7 +113,7 @@ If you wish to use the `SADX Music` option of the Randomizer, you must own a cop 6. Choose the `On` radial option and in the input box next to the slide enter a value of 60 (or 59 if 60 causes the game to crash). - Controller input is not working. - 1. Run the Launcher.exe which should be in the same folder as the SA2ModManager. + 1. Run the Launcher.exe which should be in the same folder as the your Sonic Adventure 2: Battle install. 2. Select the `Player` tab and reselect the controller for the player 1 input method. 3. Click the `Save settings and launch SONIC ADVENTURE 2` button. (Any mod manager settings will apply even if the game is launched this way rather than through the mod manager) @@ -125,7 +133,7 @@ If you wish to use the `SADX Music` option of the Randomizer, you must own a cop - If you enabled an `SADX Music` option, then most likely the music data was not copied properly into the mod folder (See Additional Options for instructions). - Mission 1 is missing a texture in the stage select UI. - - Most likely another mod is conflicting and overwriting the texture pack. It is recommeded to have the SA2B Archipelago mod load last in the mod loader. + - Most likely another mod is conflicting and overwriting the texture pack. It is recommeded to have the SA2B Archipelago mod load last in the mod manager. ## Save File Safeguard (Advanced Option) From 727915040d137da260d9f43f87e84850e76fa329 Mon Sep 17 00:00:00 2001 From: JusticePS <5125765+JusticePS@users.noreply.github.com> Date: Thu, 18 Apr 2024 10:01:12 -0700 Subject: [PATCH 089/153] Adventure: Remove runtime changes to location templates (#3010) --- worlds/adventure/Locations.py | 28 +++++++++++++++------------- worlds/adventure/Regions.py | 2 -- worlds/adventure/__init__.py | 21 ++++++++++++++++----- 3 files changed, 31 insertions(+), 20 deletions(-) diff --git a/worlds/adventure/Locations.py b/worlds/adventure/Locations.py index 2ef561b1e3e1..27e504684cbf 100644 --- a/worlds/adventure/Locations.py +++ b/worlds/adventure/Locations.py @@ -19,9 +19,9 @@ def __init__(self, room_id: int, room_x: int = None, room_y: int = None): def get_position(self, random): if self.room_x is None or self.room_y is None: - return random.choice(standard_positions) + return self.room_id, random.choice(standard_positions) else: - return self.room_x, self.room_y + return self.room_id, (self.room_x, self.room_y) class LocationData: @@ -46,24 +46,26 @@ def __init__(self, region, name, location_id, world_positions: [WorldPosition] = self.needs_bat_logic: int = needs_bat_logic self.local_item: int = None - def get_position(self, random): + def get_random_position(self, random): + x: int = None + y: int = None if self.world_positions is None or len(self.world_positions) == 0: if self.room_id is None: return None - self.room_x, self.room_y = random.choice(standard_positions) - if self.room_id is None: + x, y = random.choice(standard_positions) + return self.room_id, x, y + else: selected_pos = random.choice(self.world_positions) - self.room_id = selected_pos.room_id - self.room_x, self.room_y = selected_pos.get_position(random) - return self.room_x, self.room_y + room_id, (x, y) = selected_pos.get_position(random) + return self.get_random_room_id(random), x, y - def get_room_id(self, random): + def get_random_room_id(self, random): if self.world_positions is None or len(self.world_positions) == 0: - return None + if self.room_id is None: + return None if self.room_id is None: selected_pos = random.choice(self.world_positions) - self.room_id = selected_pos.room_id - self.room_x, self.room_y = selected_pos.get_position(random) + return selected_pos.room_id return self.room_id @@ -97,7 +99,7 @@ def get_random_room_in_regions(regions: [str], random) -> int: possible_rooms = {} for locname in location_table: if location_table[locname].region in regions: - room = location_table[locname].get_room_id(random) + room = location_table[locname].get_random_room_id(random) if room is not None: possible_rooms[room] = location_table[locname].room_id return random.choice(list(possible_rooms.keys())) diff --git a/worlds/adventure/Regions.py b/worlds/adventure/Regions.py index 4a62518fbd36..00617b2f7164 100644 --- a/worlds/adventure/Regions.py +++ b/worlds/adventure/Regions.py @@ -25,8 +25,6 @@ def connect(world: MultiWorld, player: int, source: str, target: str, rule: call def create_regions(multiworld: MultiWorld, player: int, dragon_rooms: []) -> None: - for name, locdata in location_table.items(): - locdata.get_position(multiworld.random) menu = Region("Menu", player, multiworld) diff --git a/worlds/adventure/__init__.py b/worlds/adventure/__init__.py index 9b9b0d77d800..84caca828f2c 100644 --- a/worlds/adventure/__init__.py +++ b/worlds/adventure/__init__.py @@ -371,8 +371,9 @@ def generate_output(self, output_directory: str) -> None: if location.item.player == self.player and \ location.item.name == "nothing": location_data = location_table[location.name] + room_id = location_data.get_random_room_id(self.random) auto_collect_locations.append(AdventureAutoCollectLocation(location_data.short_location_id, - location_data.room_id)) + room_id)) # standard Adventure items, which are placed in the rom elif location.item.player == self.player and \ location.item.name != "nothing" and \ @@ -383,14 +384,18 @@ def generate_output(self, output_directory: str) -> None: item_ram_address = item_ram_addresses[item_table[location.item.name].table_index] item_position_data_start = item_position_table + item_ram_address - items_ram_start location_data = location_table[location.name] - room_x, room_y = location_data.get_position(self.multiworld.per_slot_randoms[self.player]) + (room_id, room_x, room_y) = \ + location_data.get_random_position(self.random) if location_data.needs_bat_logic and bat_logic == 0x0: copied_location = copy.copy(location_data) copied_location.local_item = item_ram_address + copied_location.room_id = room_id + copied_location.room_x = room_x + copied_location.room_y = room_y bat_no_touch_locs.append(copied_location) del unplaced_local_items[location.item.name] - rom_deltas[item_position_data_start] = location_data.room_id + rom_deltas[item_position_data_start] = room_id rom_deltas[item_position_data_start + 1] = room_x rom_deltas[item_position_data_start + 2] = room_y local_item_to_location[item_table_offset] = self.location_name_to_id[location.name] \ @@ -398,14 +403,20 @@ def generate_output(self, output_directory: str) -> None: # items from other worlds, and non-standard Adventure items handled by script, like difficulty switches elif location.item.code is not None: if location.item.code != nothing_item_id: - location_data = location_table[location.name] + location_data = copy.copy(location_table[location.name]) + (room_id, room_x, room_y) = \ + location_data.get_random_position(self.random) + location_data.room_id = room_id + location_data.room_x = room_x + location_data.room_y = room_y foreign_item_locations.append(location_data) if location_data.needs_bat_logic and bat_logic == 0x0: bat_no_touch_locs.append(location_data) else: location_data = location_table[location.name] + room_id = location_data.get_random_room_id(self.random) auto_collect_locations.append(AdventureAutoCollectLocation(location_data.short_location_id, - location_data.room_id)) + room_id)) # Adventure items that are in another world get put in an invalid room until needed for unplaced_item_name, unplaced_item in unplaced_local_items.items(): item_position_data_start = get_item_position_data_start(unplaced_item.table_index) From f89cee4b15f40e23700c34abb187438eba84a2ab Mon Sep 17 00:00:00 2001 From: digiholic Date: Thu, 18 Apr 2024 11:02:01 -0600 Subject: [PATCH 090/153] MMBN3: Modernizations and Minor Bugfixes (#2991) --- data/lua/connector_mmbn3.lua | 269 +++------------------------------- worlds/mmbn3/Options.py | 14 +- worlds/mmbn3/__init__.py | 18 ++- worlds/mmbn3/docs/setup_en.md | 17 ++- 4 files changed, 51 insertions(+), 267 deletions(-) diff --git a/data/lua/connector_mmbn3.lua b/data/lua/connector_mmbn3.lua index 8482bf85b1a8..876ab8a460f0 100644 --- a/data/lua/connector_mmbn3.lua +++ b/data/lua/connector_mmbn3.lua @@ -27,14 +27,9 @@ local mmbn3Socket = nil local frame = 0 -- States -local ITEMSTATE_NONINITIALIZED = "Game Not Yet Started" -- Game has not yet started local ITEMSTATE_NONITEM = "Non-Itemable State" -- Do not send item now. RAM is not capable of holding local ITEMSTATE_IDLE = "Item State Ready" -- Ready for the next item if there are any -local ITEMSTATE_SENT = "Item Sent Not Claimed" -- The ItemBit is set, but the dialog has not been closed yet -local itemState = ITEMSTATE_NONINITIALIZED - -local itemQueued = nil -local itemQueueCounter = 120 +local itemState = ITEMSTATE_NONITEM local debugEnabled = false local game_complete = false @@ -104,21 +99,19 @@ end local IsInBattle = function() return memory.read_u8(0x020097F8) == 0x08 end -local IsItemQueued = function() - return memory.read_u8(0x2000224) == 0x01 -end - -- This function actually determines when you're on ANY full-screen menu (navi cust, link battle, etc.) but we -- don't want to check any locations there either so it's fine. local IsOnTitle = function() return bit.band(memory.read_u8(0x020097F8),0x04) == 0 end + local IsItemable = function() - return not IsInMenu() and not IsInTransition() and not IsInDialog() and not IsInBattle() and not IsOnTitle() and not IsItemQueued() + return not IsInMenu() and not IsInTransition() and not IsInDialog() and not IsInBattle() and not IsOnTitle() end local is_game_complete = function() - if IsOnTitle() or itemState == ITEMSTATE_NONINITIALIZED then return game_complete end + -- If on the title screen don't read RAM, RAM can't be trusted yet + if IsOnTitle() then return game_complete end -- If the game is already marked complete, do not read memory if game_complete then return true end @@ -177,14 +170,6 @@ local Check_Progressive_Undernet_ID = function() end return 9 end -local GenerateTextBytes = function(message) - bytes = {} - for i = 1, #message do - local c = message:sub(i,i) - table.insert(bytes, charDict[c]) - end - return bytes -end -- Item Message Generation functions local Next_Progressive_Undernet_ID = function(index) @@ -196,150 +181,6 @@ local Next_Progressive_Undernet_ID = function(index) item_index=ordered_IDs[index] return item_index end -local Extra_Progressive_Undernet = function() - fragBytes = int32ToByteList_le(20) - bytes = { - 0xF6, 0x50, fragBytes[1], fragBytes[2], fragBytes[3], fragBytes[4], 0xFF, 0xFF, 0xFF - } - bytes = TableConcat(bytes, GenerateTextBytes("The extra data\ndecompiles into:\n\"20 BugFrags\"!!")) - return bytes -end - -local GenerateChipGet = function(chip, code, amt) - chipBytes = int16ToByteList_le(chip) - bytes = { - 0xF6, 0x10, chipBytes[1], chipBytes[2], code, amt, - charDict['G'], charDict['o'], charDict['t'], charDict[' '], charDict['a'], charDict[' '], charDict['c'], charDict['h'], charDict['i'], charDict['p'], charDict[' '], charDict['f'], charDict['o'], charDict['r'], charDict['\n'], - - } - if chip < 256 then - bytes = TableConcat(bytes, { - charDict['\"'], 0xF9,0x00,chipBytes[1],0x01,0x00,0xF9,0x00,code,0x03, charDict['\"'],charDict['!'],charDict['!'] - }) - else - bytes = TableConcat(bytes, { - charDict['\"'], 0xF9,0x00,chipBytes[1],0x02,0x00,0xF9,0x00,code,0x03, charDict['\"'],charDict['!'],charDict['!'] - }) - end - return bytes -end -local GenerateKeyItemGet = function(item, amt) - bytes = { - 0xF6, 0x00, item, amt, - charDict['G'], charDict['o'], charDict['t'], charDict[' '], charDict['a'], charDict['\n'], - charDict['\"'], 0xF9, 0x00, item, 0x00, charDict['\"'],charDict['!'],charDict['!'] - } - return bytes -end -local GenerateSubChipGet = function(subchip, amt) - -- SubChips have an extra bit of trouble. If you have too many, they're supposed to skip to another text bank that doesn't give you the item - -- Instead, I'm going to just let it get eaten - bytes = { - 0xF6, 0x20, subchip, amt, 0xFF, 0xFF, 0xFF, - charDict['G'], charDict['o'], charDict['t'], charDict[' '], charDict['a'], charDict['\n'], - charDict['S'], charDict['u'], charDict['b'], charDict['C'], charDict['h'], charDict['i'], charDict['p'], charDict[' '], charDict['f'], charDict['o'], charDict['r'], charDict['\n'], - charDict['\"'], 0xF9, 0x00, subchip, 0x00, charDict['\"'],charDict['!'],charDict['!'] - } - return bytes -end -local GenerateZennyGet = function(amt) - zennyBytes = int32ToByteList_le(amt) - bytes = { - 0xF6, 0x30, zennyBytes[1], zennyBytes[2], zennyBytes[3], zennyBytes[4], 0xFF, 0xFF, 0xFF, - charDict['G'], charDict['o'], charDict['t'], charDict[' '], charDict['a'], charDict['\n'], charDict['\"'] - } - -- The text needs to be added one char at a time, so we need to convert the number to a string then iterate through it - zennyStr = tostring(amt) - for i = 1, #zennyStr do - local c = zennyStr:sub(i,i) - table.insert(bytes, charDict[c]) - end - bytes = TableConcat(bytes, { - charDict[' '], charDict['Z'], charDict['e'], charDict['n'], charDict['n'], charDict['y'], charDict['s'], charDict['\"'],charDict['!'],charDict['!'] - }) - return bytes -end -local GenerateProgramGet = function(program, color, amt) - bytes = { - 0xF6, 0x40, (program * 4), amt, color, - charDict['G'], charDict['o'], charDict['t'], charDict[' '], charDict['a'], charDict[' '], charDict['N'], charDict['a'], charDict['v'], charDict['i'], charDict['\n'], - charDict['C'], charDict['u'], charDict['s'], charDict['t'], charDict['o'], charDict['m'], charDict['i'], charDict['z'], charDict['e'], charDict['r'], charDict[' '], charDict['P'], charDict['r'], charDict['o'], charDict['g'], charDict['r'], charDict['a'], charDict['m'], charDict[':'], charDict['\n'], - charDict['\"'], 0xF9, 0x00, program, 0x05, charDict['\"'],charDict['!'],charDict['!'] - } - - return bytes -end -local GenerateBugfragGet = function(amt) - fragBytes = int32ToByteList_le(amt) - bytes = { - 0xF6, 0x50, fragBytes[1], fragBytes[2], fragBytes[3], fragBytes[4], 0xFF, 0xFF, 0xFF, - charDict['G'], charDict['o'], charDict['t'], charDict[':'], charDict['\n'], charDict['\"'] - } - -- The text needs to be added one char at a time, so we need to convert the number to a string then iterate through it - bugFragStr = tostring(amt) - for i = 1, #bugFragStr do - local c = bugFragStr:sub(i,i) - table.insert(bytes, charDict[c]) - end - bytes = TableConcat(bytes, { - charDict[' '], charDict['B'], charDict['u'], charDict['g'], charDict['F'], charDict['r'], charDict['a'], charDict['g'], charDict['s'], charDict['\"'],charDict['!'],charDict['!'] - }) - return bytes -end -local GenerateGetMessageFromItem = function(item) - --Special case for progressive undernet - if item["type"] == "undernet" then - undernet_id = Check_Progressive_Undernet_ID() - if undernet_id > 8 then - return Extra_Progressive_Undernet() - end - return GenerateKeyItemGet(Next_Progressive_Undernet_ID(undernet_id),1) - elseif item["type"] == "chip" then - return GenerateChipGet(item["itemID"], item["subItemID"], item["count"]) - elseif item["type"] == "key" then - return GenerateKeyItemGet(item["itemID"], item["count"]) - elseif item["type"] == "subchip" then - return GenerateSubChipGet(item["itemID"], item["count"]) - elseif item["type"] == "zenny" then - return GenerateZennyGet(item["count"]) - elseif item["type"] == "program" then - return GenerateProgramGet(item["itemID"], item["subItemID"], item["count"]) - elseif item["type"] == "bugfrag" then - return GenerateBugfragGet(item["count"]) - end - - return GenerateTextBytes("Empty Message") -end - -local GetMessage = function(item) - startBytes = {0x02, 0x00} - playerLockBytes = {0xF8,0x00, 0xF8, 0x10} - msgOpenBytes = {0xF1, 0x02} - textBytes = GenerateTextBytes("Receiving\ndata from\n"..item["sender"]..".") - dotdotWaitBytes = {0xEA,0x00,0x0A,0x00,0x4D,0xEA,0x00,0x0A,0x00,0x4D} - continueBytes = {0xEB, 0xE9} - -- continueBytes = {0xE9} - playReceiveAnimationBytes = {0xF8,0x04,0x18} - chipGiveBytes = GenerateGetMessageFromItem(item) - playerFinishBytes = {0xF8, 0x0C} - playerUnlockBytes={0xEB, 0xF8, 0x08} - -- playerUnlockBytes={0xF8, 0x08} - endMessageBytes = {0xF8, 0x10, 0xE7} - - bytes = {} - bytes = TableConcat(bytes,startBytes) - bytes = TableConcat(bytes,playerLockBytes) - bytes = TableConcat(bytes,msgOpenBytes) - bytes = TableConcat(bytes,textBytes) - bytes = TableConcat(bytes,dotdotWaitBytes) - bytes = TableConcat(bytes,continueBytes) - bytes = TableConcat(bytes,playReceiveAnimationBytes) - bytes = TableConcat(bytes,chipGiveBytes) - bytes = TableConcat(bytes,playerFinishBytes) - bytes = TableConcat(bytes,playerUnlockBytes) - bytes = TableConcat(bytes,endMessageBytes) - return bytes -end local getChipCodeIndex = function(chip_id, chip_code) chipCodeArrayStartAddress = 0x8011510 + (0x20 * chip_id) @@ -353,6 +194,10 @@ local getChipCodeIndex = function(chip_id, chip_code) end local getProgramColorIndex = function(program_id, program_color) + -- For whatever reason, OilBody (ID 24) does not follow the rules and should be color index 3 + if program_id == 24 then + return 3 + end -- The general case, most programs use white pink or yellow. This is the values the enums already have if program_id >= 20 and program_id <= 47 then return program_color-1 @@ -401,11 +246,11 @@ local changeZenny = function(val) return 0 end if memory.read_u32_le(0x20018F4) <= math.abs(tonumber(val)) and tonumber(val) < 0 then - memory.write_u32_le(0x20018f4, 0) + memory.write_u32_le(0x20018F4, 0) val = 0 return "empty" end - memory.write_u32_le(0x20018f4, memory.read_u32_le(0x20018F4) + tonumber(val)) + memory.write_u32_le(0x20018F4, memory.read_u32_le(0x20018F4) + tonumber(val)) if memory.read_u32_le(0x20018F4) > 999999 then memory.write_u32_le(0x20018F4, 999999) end @@ -417,30 +262,17 @@ local changeFrags = function(val) return 0 end if memory.read_u16_le(0x20018F8) <= math.abs(tonumber(val)) and tonumber(val) < 0 then - memory.write_u16_le(0x20018f8, 0) + memory.write_u16_le(0x20018F8, 0) val = 0 return "empty" end - memory.write_u16_le(0x20018f8, memory.read_u16_le(0x20018F8) + tonumber(val)) + memory.write_u16_le(0x20018F8, memory.read_u16_le(0x20018F8) + tonumber(val)) if memory.read_u16_le(0x20018F8) > 9999 then memory.write_u16_le(0x20018F8, 9999) end return val end --- Fix Health Pools -local fix_hp = function() - -- Current Health fix - if IsInBattle() and not (memory.read_u16_le(0x20018A0) == memory.read_u16_le(0x2037294)) then - memory.write_u16_le(0x20018A0, memory.read_u16_le(0x2037294)) - end - - -- Max Health Fix - if IsInBattle() and not (memory.read_u16_le(0x20018A2) == memory.read_u16_le(0x2037296)) then - memory.write_u16_le(0x20018A2, memory.read_u16_le(0x2037296)) - end -end - local changeRegMemory = function(amt) regMemoryAddress = 0x02001897 currentRegMem = memory.read_u8(regMemoryAddress) @@ -448,34 +280,18 @@ local changeRegMemory = function(amt) end local changeMaxHealth = function(val) - fix_hp() - if val == nil then - fix_hp() + if val == nil then return 0 end - if math.abs(tonumber(val)) >= memory.read_u16_le(0x20018A2) and tonumber(val) < 0 then - memory.write_u16_le(0x20018A2, 0) - if IsInBattle() then - memory.write_u16_le(0x2037296, memory.read_u16_le(0x20018A2)) - if memory.read_u16_le(0x2037296) >= memory.read_u16_le(0x20018A2) then - memory.write_u16_le(0x2037296, memory.read_u16_le(0x20018A2)) - end - end - fix_hp() - return "lethal" - end + memory.write_u16_le(0x20018A2, memory.read_u16_le(0x20018A2) + tonumber(val)) if memory.read_u16_le(0x20018A2) > 9999 then memory.write_u16_le(0x20018A2, 9999) end - if IsInBattle() then - memory.write_u16_le(0x2037296, memory.read_u16_le(0x20018A2)) - end - fix_hp() return val end -local SendItem = function(item) +local SendItemToGame = function(item) if item["type"] == "undernet" then undernet_id = Check_Progressive_Undernet_ID() if undernet_id > 8 then @@ -553,13 +369,6 @@ local OpenShortcuts = function() end end -local RestoreItemRam = function() - if backup_bytes ~= nil then - memory.write_bytes_as_array(0x203fe10, backup_bytes) - end - backup_bytes = nil -end - local process_block = function(block) -- Sometimes the block is nothing, if this is the case then quietly stop processing if block == nil then @@ -574,14 +383,7 @@ local process_block = function(block) end local itemStateMachineProcess = function() - if itemState == ITEMSTATE_NONINITIALIZED then - itemQueueCounter = 120 - -- Only exit this state the first time a dialog window pops up. This way we know for sure that we're ready to receive - if not IsInMenu() and (IsInDialog() or IsInTransition()) then - itemState = ITEMSTATE_NONITEM - end - elseif itemState == ITEMSTATE_NONITEM then - itemQueueCounter = 120 + if itemState == ITEMSTATE_NONITEM then -- Always attempt to restore the previously stored memory in this state -- Exit this state whenever the game is in an itemable status if IsItemable() then @@ -592,26 +394,11 @@ local itemStateMachineProcess = function() if not IsItemable() then itemState = ITEMSTATE_NONITEM end - if itemQueueCounter == 0 then - if #itemsReceived > loadItemIndexFromRAM() and not IsItemQueued() then - itemQueued = itemsReceived[loadItemIndexFromRAM()+1] - SendItem(itemQueued) - itemState = ITEMSTATE_SENT - end - else - itemQueueCounter = itemQueueCounter - 1 - end - elseif itemState == ITEMSTATE_SENT then - -- Once the item is sent, wait for the dialog to close. Then clear the item bit and be ready for the next item. - if IsInTransition() or IsInMenu() or IsOnTitle() then - itemState = ITEMSTATE_NONITEM - itemQueued = nil - RestoreItemRam() - elseif not IsInDialog() then - itemState = ITEMSTATE_IDLE + if #itemsReceived > loadItemIndexFromRAM() then + itemQueued = itemsReceived[loadItemIndexFromRAM()+1] + SendItemToGame(itemQueued) saveItemIndexToRAM(itemQueued["itemIndex"]) - itemQueued = nil - RestoreItemRam() + itemState = ITEMSTATE_NONITEM end end end @@ -702,18 +489,8 @@ function main() -- Handle the debug data display gui.cleartext() if debugEnabled then - -- gui.text(0,0,"Item Queued: "..tostring(IsItemQueued())) - -- gui.text(0,16,"In Battle: "..tostring(IsInBattle())) - -- gui.text(0,32,"In Dialog: "..tostring(IsInDialog())) - -- gui.text(0,48,"In Menu: "..tostring(IsInMenu())) - gui.text(0,48,"Item Wait Time: "..tostring(itemQueueCounter)) - gui.text(0,64,itemState) - if itemQueued == nil then - gui.text(0,80,"No item queued") - else - gui.text(0,80,itemQueued["type"].." "..itemQueued["itemID"]) - end - gui.text(0,96,"Item Index: "..loadItemIndexFromRAM()) + gui.text(0,0,itemState) + gui.text(0,16,"Item Index: "..loadItemIndexFromRAM()) end emu.frameadvance() diff --git a/worlds/mmbn3/Options.py b/worlds/mmbn3/Options.py index 96a01290a5c7..4ed64e3d9dbf 100644 --- a/worlds/mmbn3/Options.py +++ b/worlds/mmbn3/Options.py @@ -1,4 +1,5 @@ -from Options import Choice, Range, DefaultOnToggle +from dataclasses import dataclass +from Options import Choice, Range, DefaultOnToggle, PerGameCommonOptions class ExtraRanks(Range): @@ -41,8 +42,9 @@ class TradeQuestHinting(Choice): default = 2 -MMBN3Options = { - "extra_ranks": ExtraRanks, - "include_jobs": IncludeJobs, - "trade_quest_hinting": TradeQuestHinting, -} +@dataclass +class MMBN3Options(PerGameCommonOptions): + extra_ranks: ExtraRanks + include_jobs: IncludeJobs + trade_quest_hinting: TradeQuestHinting + \ No newline at end of file diff --git a/worlds/mmbn3/__init__.py b/worlds/mmbn3/__init__.py index 762bfd11ae4a..eac8a37bf06d 100644 --- a/worlds/mmbn3/__init__.py +++ b/worlds/mmbn3/__init__.py @@ -7,6 +7,7 @@ LocationProgressType from worlds.AutoWorld import WebWorld, World + from .Rom import MMBN3DeltaPatch, LocalRom, get_base_rom_path from .Items import MMBN3Item, ItemData, item_table, all_items, item_frequencies, items_by_id, ItemType from .Locations import Location, MMBN3Location, all_locations, location_table, location_data_table, \ @@ -51,7 +52,8 @@ class MMBN3World(World): threat the Internet has ever faced! """ game = "MegaMan Battle Network 3" - option_definitions = MMBN3Options + options_dataclass = MMBN3Options + options: MMBN3Options settings: typing.ClassVar[MMBN3Settings] topology_present = False @@ -71,10 +73,10 @@ def generate_early(self) -> None: Already has access to player options and RNG. """ self.item_frequencies = item_frequencies.copy() - if self.multiworld.extra_ranks[self.player] > 0: - self.item_frequencies[ItemName.Progressive_Undernet_Rank] = 8 + self.multiworld.extra_ranks[self.player] + if self.options.extra_ranks > 0: + self.item_frequencies[ItemName.Progressive_Undernet_Rank] = 8 + self.options.extra_ranks - if not self.multiworld.include_jobs[self.player]: + if not self.options.include_jobs: self.excluded_locations = always_excluded_locations + [job.name for job in jobs] else: self.excluded_locations = always_excluded_locations @@ -160,7 +162,7 @@ def create_items(self) -> None: remaining = len(all_locations) - len(required_items) for i in range(remaining): - filler_item_name = self.multiworld.random.choice(filler_items) + filler_item_name = self.random.choice(filler_items) item = self.create_item(filler_item_name) self.multiworld.itempool.append(item) filler_items.remove(filler_item_name) @@ -411,10 +413,10 @@ def generate_output(self, output_directory: str) -> None: long_item_text = "" # No item hinting - if self.multiworld.trade_quest_hinting[self.player] == 0: + if self.options.trade_quest_hinting == 0: item_name_text = "Check" # Partial item hinting - elif self.multiworld.trade_quest_hinting[self.player] == 1: + elif self.options.trade_quest_hinting == 1: if item.progression == ItemClassification.progression \ or item.progression == ItemClassification.progression_skip_balancing: item_name_text = "Progress" @@ -466,7 +468,7 @@ def create_event(self, event: str): return MMBN3Item(event, ItemClassification.progression, None, self.player) def fill_slot_data(self): - return {name: getattr(self.multiworld, name)[self.player].value for name in self.option_definitions} + return self.options.as_dict("extra_ranks", "include_jobs", "trade_quest_hinting") def explore_score(self, state): diff --git a/worlds/mmbn3/docs/setup_en.md b/worlds/mmbn3/docs/setup_en.md index 44a6b9c14448..b26403f78bb9 100644 --- a/worlds/mmbn3/docs/setup_en.md +++ b/worlds/mmbn3/docs/setup_en.md @@ -18,11 +18,12 @@ on Steam, you can obtain a copy of this ROM from the game's files, see instructi Once Bizhawk has been installed, open Bizhawk and change the following settings: -- Go to Config > Customize. Switch to the Advanced tab, then switch the Lua Core from "NLua+KopiLua" to - "Lua+LuaInterface". This is required for the Lua script to function correctly. - **NOTE: Even if "Lua+LuaInterface" is already selected, toggle between the two options and reselect it. Fresh installs** - **of newer versions of Bizhawk have a tendency to show "Lua+LuaInterface" as the default selected option but still load** - **"NLua+KopiLua" until this step is done.** +- **If you are using a version of BizHawk older than 2.9**, you will need to modify the Lua Core. + Go to Config > Customize. Switch to the Advanced tab, then switch the Lua Core from "NLua+KopiLua" to + "Lua+LuaInterface". This is required for the Lua script to function correctly. + **NOTE:** Even if "Lua+LuaInterface" is already selected, toggle between the two options and reselect it. Fresh installs + of newer versions of Bizhawk have a tendency to show "Lua+LuaInterface" as the default selected option but still load + "NLua+KopiLua" until this step is done. - Under Config > Customize > Advanced, make sure the box for AutoSaveRAM is checked, and click the 5s button. This reduces the possibility of losing save data in emulator crashes. - Under Config > Customize, check the "Run in background" and "Accept background input" boxes. This will allow you to @@ -37,7 +38,7 @@ and select EmuHawk.exe. ## Extracting a ROM from the Legacy Collection -The Steam version of the Legacy Collection contains unmodified GBA ROMs in its files. You can extract these for use with Archipelago. +The Steam version of the Battle Network Legacy Collection contains unmodified GBA ROMs in its files. You can extract these for use with Archipelago. 1. Open the Legacy Collection Vol. 1's Game Files (Right click on the game in your Library, then open Properties -> Installed Files -> Browse) 2. Open the file `exe/data/exe3b.dat` in a zip-extracting program such as 7-Zip or WinRAR. @@ -73,7 +74,9 @@ to the emulator as recommended). Once both the client and the emulator are started, you must connect them. Within the emulator click on the "Tools" menu and select "Lua Console". Click the folder button or press Ctrl+O to open a Lua script. -Navigate to your Archipelago install folder and open `data/lua/connector_mmbn3.lua`. +Navigate to your Archipelago install folder and open `data/lua/connector_mmbn3.lua`. +**NOTE:** The MMBN3 Lua file depends on other shared Lua files inside of the `data` directory in the Archipelago +installation. Do not move this Lua file from its default location or you may run into issues connecting. To connect the client to the multiserver simply put `
:` on the textfield on top and press enter (if the server uses password, type in the bottom textfield `/connect
: [password]`) From 6087ec539bbefd3e56fbccce1badc3489298f8bb Mon Sep 17 00:00:00 2001 From: black-sliver <59490463+black-sliver@users.noreply.github.com> Date: Thu, 18 Apr 2024 19:13:43 +0200 Subject: [PATCH 091/153] Settings: disable automatic yaml line breaks (#3096) * Settings: disable automatic yaml line breaks * Tests: add settings formatting checks * Tests: fix typing in test_host_yaml --- settings.py | 2 +- test/general/test_host_yaml.py | 54 ++++++++++++++++++++++++++++++++-- 2 files changed, 53 insertions(+), 3 deletions(-) diff --git a/settings.py b/settings.py index 390920433c03..e94bb3425fe1 100644 --- a/settings.py +++ b/settings.py @@ -200,7 +200,7 @@ def as_dict(self, *args: str, downcast: bool = True) -> Dict[str, Any]: def _dump_value(cls, value: Any, f: TextIO, indent: str) -> None: """Write a single yaml line to f""" from Utils import dump, Dumper as BaseDumper - yaml_line: str = dump(value, Dumper=cast(BaseDumper, cls._dumper)) + yaml_line: str = dump(value, Dumper=cast(BaseDumper, cls._dumper), width=2**31-1) assert yaml_line.count("\n") == 1, f"Unexpected input for yaml dumper: {value}" f.write(f"{indent}{yaml_line}") diff --git a/test/general/test_host_yaml.py b/test/general/test_host_yaml.py index 79285d3a633a..7174befca428 100644 --- a/test/general/test_host_yaml.py +++ b/test/general/test_host_yaml.py @@ -1,18 +1,24 @@ import os import unittest +from io import StringIO from tempfile import TemporaryFile +from typing import Any, Dict, List, cast -from settings import Settings import Utils +from settings import Settings, Group class TestIDs(unittest.TestCase): + yaml_options: Dict[Any, Any] + @classmethod def setUpClass(cls) -> None: with TemporaryFile("w+", encoding="utf-8") as f: Settings(None).dump(f) f.seek(0, os.SEEK_SET) - cls.yaml_options = Utils.parse_yaml(f.read()) + yaml_options = Utils.parse_yaml(f.read()) + assert isinstance(yaml_options, dict) + cls.yaml_options = yaml_options def test_utils_in_yaml(self) -> None: """Tests that the auto generated host.yaml has default settings in it""" @@ -30,3 +36,47 @@ def test_yaml_in_utils(self) -> None: self.assertIn(option_key, utils_options) for sub_option_key in option_set: self.assertIn(sub_option_key, utils_options[option_key]) + + +class TestSettingsDumper(unittest.TestCase): + def test_string_format(self) -> None: + """Test that dumping a string will yield the expected output""" + # By default, pyyaml has automatic line breaks in strings and quoting is optional. + # What we want for consistency instead is single-line strings and always quote them. + # Line breaks have to become \n in that quoting style. + class AGroup(Group): + key: str = " ".join(["x"] * 60) + "\n" # more than 120 chars, contains spaces and a line break + + with StringIO() as writer: + AGroup().dump(writer, 0) + expected_value = AGroup.key.replace("\n", "\\n") + self.assertEqual(writer.getvalue(), f"key: \"{expected_value}\"\n", + "dumped string has unexpected formatting") + + def test_indentation(self) -> None: + """Test that dumping items will add indentation""" + # NOTE: we don't care how many spaces there are, but it has to be a multiple of level + class AList(List[Any]): + __doc__ = None # make sure we get no doc string + + class AGroup(Group): + key: AList = cast(AList, ["a", "b", [1]]) + + for level in range(3): + with StringIO() as writer: + AGroup().dump(writer, level) + lines = writer.getvalue().split("\n", 5) + key_line = lines[0] + key_spaces = len(key_line) - len(key_line.lstrip(" ")) + value_lines = lines[1:-1] + value_spaces = [len(value_line) - len(value_line.lstrip(" ")) for value_line in value_lines] + if level == 0: + self.assertEqual(key_spaces, 0) + else: + self.assertGreaterEqual(key_spaces, level) + self.assertEqual(key_spaces % level, 0) + self.assertGreaterEqual(value_spaces[0], key_spaces) # a + self.assertEqual(value_spaces[1], value_spaces[0]) # b + self.assertEqual(value_spaces[2], value_spaces[0]) # start of sub-list + self.assertGreater(value_spaces[3], value_spaces[0], + f"{value_lines[3]} should have more indentation than {value_lines[0]} in {lines}") From b372b9da20390450fe53bfbcaa5dd4810a408df5 Mon Sep 17 00:00:00 2001 From: Alchav <59858495+Alchav@users.noreply.github.com> Date: Thu, 18 Apr 2024 15:33:41 -0400 Subject: [PATCH 092/153] LTTP: ToH Crystal Switch Logic (#3172) --- worlds/alttp/Rules.py | 9 ++++++--- worlds/alttp/StateHelpers.py | 7 +++++++ worlds/alttp/test/dungeons/TestTowerOfHera.py | 10 +++++++--- worlds/alttp/test/inverted_owg/TestDungeons.py | 3 ++- worlds/alttp/test/owg/TestDungeons.py | 8 ++++---- 5 files changed, 26 insertions(+), 11 deletions(-) diff --git a/worlds/alttp/Rules.py b/worlds/alttp/Rules.py index 9a13c2c5d02f..5e4635fa2754 100644 --- a/worlds/alttp/Rules.py +++ b/worlds/alttp/Rules.py @@ -18,7 +18,8 @@ can_shoot_arrows, has_beam_sword, has_crystals, has_fire_source, has_hearts, has_melee_weapon, has_misery_mire_medallion, has_sword, has_turtle_rock_medallion, - has_triforce_pieces, can_use_bombs, can_bomb_or_bonk) + has_triforce_pieces, can_use_bombs, can_bomb_or_bonk, + can_activate_crystal_switch) from .UnderworldGlitchRules import underworld_glitches_rules @@ -357,8 +358,10 @@ def global_rules(multiworld: MultiWorld, player: int): if not (multiworld.small_key_shuffle[player] and multiworld.big_key_shuffle[player]): add_rule(multiworld.get_location('Desert Palace - Prize', player), lambda state: state.multiworld.get_region('Desert Palace Main (Outer)', player).can_reach(state)) - set_rule(multiworld.get_entrance('Tower of Hera Small Key Door', player), lambda state: state._lttp_has_key('Small Key (Tower of Hera)', player) or location_item_name(state, 'Tower of Hera - Big Key Chest', player) == ('Small Key (Tower of Hera)', player)) - set_rule(multiworld.get_entrance('Tower of Hera Big Key Door', player), lambda state: state.has('Big Key (Tower of Hera)', player)) + set_rule(multiworld.get_location('Tower of Hera - Basement Cage', player), lambda state: can_activate_crystal_switch(state, player)) + set_rule(multiworld.get_location('Tower of Hera - Map Chest', player), lambda state: can_activate_crystal_switch(state, player)) + set_rule(multiworld.get_entrance('Tower of Hera Small Key Door', player), lambda state: can_activate_crystal_switch(state, player) and (state._lttp_has_key('Small Key (Tower of Hera)', player) or location_item_name(state, 'Tower of Hera - Big Key Chest', player) == ('Small Key (Tower of Hera)', player))) + set_rule(multiworld.get_entrance('Tower of Hera Big Key Door', player), lambda state: can_activate_crystal_switch(state, player) and state.has('Big Key (Tower of Hera)', player)) if multiworld.enemy_shuffle[player]: add_rule(multiworld.get_entrance('Tower of Hera Big Key Door', player), lambda state: can_kill_most_things(state, player, 3)) else: diff --git a/worlds/alttp/StateHelpers.py b/worlds/alttp/StateHelpers.py index 80bf3c1ad77f..fe3a43ee0f55 100644 --- a/worlds/alttp/StateHelpers.py +++ b/worlds/alttp/StateHelpers.py @@ -106,6 +106,12 @@ def can_bomb_or_bonk(state: CollectionState, player: int) -> bool: return state.has("Pegasus Boots", player) or can_use_bombs(state, player) +def can_activate_crystal_switch(state: CollectionState, player: int) -> bool: + return (has_melee_weapon(state, player) or can_use_bombs(state, player) or can_shoot_arrows(state, player) + or state.has_any(["Hookshot", "Cane of Somaria", "Cane of Byrna", "Fire Rod", "Ice Rod", "Blue Boomerang", + "Red Boomerang"], player)) + + def can_kill_most_things(state: CollectionState, player: int, enemies: int = 5) -> bool: if state.multiworld.enemy_shuffle[player]: # I don't fully understand Enemizer's logic for placing enemies in spots where they need to be killable, if any. @@ -173,6 +179,7 @@ def can_melt_things(state: CollectionState, player: int) -> bool: def has_misery_mire_medallion(state: CollectionState, player: int) -> bool: return state.has(state.multiworld.worlds[player].required_medallions[0], player) + def has_turtle_rock_medallion(state: CollectionState, player: int) -> bool: return state.has(state.multiworld.worlds[player].required_medallions[1], player) diff --git a/worlds/alttp/test/dungeons/TestTowerOfHera.py b/worlds/alttp/test/dungeons/TestTowerOfHera.py index 3299e20291b0..29cbcbf91fe2 100644 --- a/worlds/alttp/test/dungeons/TestTowerOfHera.py +++ b/worlds/alttp/test/dungeons/TestTowerOfHera.py @@ -9,12 +9,16 @@ def testTowerOfHera(self): ["Tower of Hera - Big Key Chest", False, []], ["Tower of Hera - Big Key Chest", False, [], ['Small Key (Tower of Hera)']], ["Tower of Hera - Big Key Chest", False, [], ['Lamp', 'Fire Rod']], - ["Tower of Hera - Big Key Chest", True, ['Small Key (Tower of Hera)', 'Lamp']], + ["Tower of Hera - Big Key Chest", True, ['Small Key (Tower of Hera)', 'Lamp', 'Bomb Upgrade (50)']], ["Tower of Hera - Big Key Chest", True, ['Small Key (Tower of Hera)', 'Fire Rod']], - ["Tower of Hera - Basement Cage", True, []], + ["Tower of Hera - Basement Cage", False, []], + ["Tower of Hera - Basement Cage", True, ['Bomb Upgrade (50)']], + ["Tower of Hera - Basement Cage", True, ['Progressive Sword']], - ["Tower of Hera - Map Chest", True, []], + ["Tower of Hera - Map Chest", False, []], + ["Tower of Hera - Map Chest", True, ['Bomb Upgrade (50)']], + ["Tower of Hera - Map Chest", True, ['Progressive Sword']], ["Tower of Hera - Compass Chest", False, []], ["Tower of Hera - Compass Chest", False, [], ['Big Key (Tower of Hera)']], diff --git a/worlds/alttp/test/inverted_owg/TestDungeons.py b/worlds/alttp/test/inverted_owg/TestDungeons.py index 53b12bdf89d1..ada1b92fca49 100644 --- a/worlds/alttp/test/inverted_owg/TestDungeons.py +++ b/worlds/alttp/test/inverted_owg/TestDungeons.py @@ -41,7 +41,8 @@ def testFirstDungeonChests(self): ["Tower of Hera - Basement Cage", False, []], ["Tower of Hera - Basement Cage", False, [], ['Moon Pearl']], - ["Tower of Hera - Basement Cage", True, ['Pegasus Boots', 'Moon Pearl']], + ["Tower of Hera - Basement Cage", True, ['Pegasus Boots', 'Moon Pearl', 'Bomb Upgrade (50)']], + ["Tower of Hera - Basement Cage", True, ['Pegasus Boots', 'Moon Pearl', 'Progressive Sword']], ["Castle Tower - Room 03", False, []], ["Castle Tower - Room 03", False, [], ['Bomb Upgrade (+5)', 'Bomb Upgrade (+10)', 'Bomb Upgrade (50)', 'Progressive Sword', 'Hammer', 'Progressive Bow', 'Fire Rod', 'Ice Rod', 'Cane of Somaria', 'Cane of Byrna']], diff --git a/worlds/alttp/test/owg/TestDungeons.py b/worlds/alttp/test/owg/TestDungeons.py index e43e18d16cf2..2e55b308d327 100644 --- a/worlds/alttp/test/owg/TestDungeons.py +++ b/worlds/alttp/test/owg/TestDungeons.py @@ -34,11 +34,11 @@ def testFirstDungeonChests(self): ["Tower of Hera - Basement Cage", False, [], ['Pegasus Boots', "Flute", "Lamp"]], ["Tower of Hera - Basement Cage", False, [], ['Pegasus Boots', "Magic Mirror", "Hammer"]], ["Tower of Hera - Basement Cage", False, [], ['Pegasus Boots', "Magic Mirror", "Hookshot"]], - ["Tower of Hera - Basement Cage", True, ['Pegasus Boots']], - ["Tower of Hera - Basement Cage", True, ["Flute", "Magic Mirror"]], - ["Tower of Hera - Basement Cage", True, ["Progressive Glove", "Lamp", "Magic Mirror"]], + ["Tower of Hera - Basement Cage", True, ['Pegasus Boots', 'Bomb Upgrade (50)']], + ["Tower of Hera - Basement Cage", True, ["Flute", "Magic Mirror", 'Bomb Upgrade (50)']], + ["Tower of Hera - Basement Cage", True, ["Progressive Glove", "Lamp", "Magic Mirror", 'Bomb Upgrade (50)']], ["Tower of Hera - Basement Cage", True, ["Flute", "Hookshot", "Hammer"]], - ["Tower of Hera - Basement Cage", True, ["Progressive Glove", "Lamp", "Magic Mirror"]], + ["Tower of Hera - Basement Cage", True, ["Progressive Glove", "Lamp", "Magic Mirror", 'Bomb Upgrade (50)']], ["Castle Tower - Room 03", False, []], ["Castle Tower - Room 03", False, ['Progressive Sword'], ['Progressive Sword', 'Cape', 'Beat Agahnim 1']], From a06bca95ad95dbf0f468266c9dd83ff7f446533e Mon Sep 17 00:00:00 2001 From: Silvris <58583688+Silvris@users.noreply.github.com> Date: Thu, 18 Apr 2024 18:24:00 -0500 Subject: [PATCH 093/153] CV64: Include player in APPP constructor (#3175) --- worlds/cv64/__init__.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/worlds/cv64/__init__.py b/worlds/cv64/__init__.py index 2bceefee0ed0..afa59b31da1b 100644 --- a/worlds/cv64/__init__.py +++ b/worlds/cv64/__init__.py @@ -270,7 +270,7 @@ def generate_output(self, output_directory: str) -> None: offset_data.update(get_start_inventory_data(self.player, self.options, self.multiworld.precollected_items[self.player])) - patch = CV64ProcedurePatch() + patch = CV64ProcedurePatch(player=self.player, player_name=self.multiworld.player_name[self.player]) write_patch(self, patch, offset_data, shop_name_list, shop_desc_list, shop_colors_list, active_locations) rom_path = os.path.join(output_directory, f"{self.multiworld.get_out_file_name_base(self.player)}" From 8021ec744fd861772af59965e8d6cf2818cf9d8e Mon Sep 17 00:00:00 2001 From: Silvris <58583688+Silvris@users.noreply.github.com> Date: Fri, 19 Apr 2024 16:10:10 -0500 Subject: [PATCH 094/153] LttP: fix percentage Triforce Pieces and missed cleanup from #3160 (#3178) --- worlds/alttp/ItemPool.py | 2 +- worlds/alttp/__init__.py | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/worlds/alttp/ItemPool.py b/worlds/alttp/ItemPool.py index af35d00f8878..69ecadc79d07 100644 --- a/worlds/alttp/ItemPool.py +++ b/worlds/alttp/ItemPool.py @@ -682,7 +682,7 @@ def place_item(loc, item): triforce_pieces = world.triforce_pieces_available[player].value + world.triforce_pieces_extra[player].value elif world.triforce_pieces_mode[player].value == TriforcePiecesMode.option_percentage: percentage = float(world.triforce_pieces_percentage[player].value) / 100 - triforce_pieces = round(world.triforce_pieces_required[player].value * percentage, 0) + triforce_pieces = int(round(world.triforce_pieces_required[player].value * percentage, 0)) else: # available triforce_pieces = world.triforce_pieces_available[player].value diff --git a/worlds/alttp/__init__.py b/worlds/alttp/__init__.py index f84c28be4bcc..f4a374ce0201 100644 --- a/worlds/alttp/__init__.py +++ b/worlds/alttp/__init__.py @@ -484,8 +484,8 @@ def collect_item(self, state: CollectionState, item: Item, remove=False): if state.has('Silver Bow', item.player): return elif state.has('Bow', item.player) and (self.difficulty_requirements.progressive_bow_limit >= 2 - or self.glitches_required == 'no_glitches' - or self.swordless): # modes where silver bow is always required for ganon + or self.multiworld.glitches_required[self.player] == 'no_glitches' + or self.multiworld.swordless[self.player]): # modes where silver bow is always required for ganon return 'Silver Bow' elif self.difficulty_requirements.progressive_bow_limit >= 1: return 'Bow' From 7a004de9a00fc86f64aaf299b029b1e2b040ad08 Mon Sep 17 00:00:00 2001 From: Fabian Dill Date: Fri, 19 Apr 2024 23:10:29 +0200 Subject: [PATCH 095/153] LttP: remove glitch triforce setting (#3174) --- BaseClasses.py | 1 - Generate.py | 1 - Main.py | 1 - settings.py | 1 - worlds/alttp/Rom.py | 2 +- 5 files changed, 1 insertion(+), 5 deletions(-) diff --git a/BaseClasses.py b/BaseClasses.py index c98909380732..53a6b3b19215 100644 --- a/BaseClasses.py +++ b/BaseClasses.py @@ -133,7 +133,6 @@ def __init__(self, players: int): self.random = ThreadBarrierProxy(random.Random()) self.players = players self.player_types = {player: NetUtils.SlotType.player for player in self.player_ids} - self.glitch_triforce = False self.algorithm = 'balanced' self.groups = {} self.regions = self.RegionManager(players) diff --git a/Generate.py b/Generate.py index a04e913d6eea..8c649d76b770 100644 --- a/Generate.py +++ b/Generate.py @@ -147,7 +147,6 @@ def main(args=None, callback=ERmain): erargs = parse_arguments(['--multi', str(args.multi)]) erargs.seed = seed erargs.plando_options = args.plando - erargs.glitch_triforce = options.generator.glitch_triforce_room erargs.spoiler = args.spoiler erargs.race = args.race erargs.outputname = seed_name diff --git a/Main.py b/Main.py index 50ad94de0198..1be91a8bb2f1 100644 --- a/Main.py +++ b/Main.py @@ -43,7 +43,6 @@ def main(args, seed=None, baked_server_options: Optional[Dict[str, object]] = No multiworld.player_name = args.name.copy() multiworld.sprite = args.sprite.copy() multiworld.sprite_pool = args.sprite_pool.copy() - multiworld.glitch_triforce = args.glitch_triforce # This is enabled/disabled globally, no per player option. multiworld.set_options(args) multiworld.set_item_links() diff --git a/settings.py b/settings.py index e94bb3425fe1..b463c5a0476c 100644 --- a/settings.py +++ b/settings.py @@ -671,7 +671,6 @@ class Race(IntEnum): weights_file_path: WeightsFilePath = WeightsFilePath("weights.yaml") meta_file_path: MetaFilePath = MetaFilePath("meta.yaml") spoiler: Spoiler = Spoiler(3) - glitch_triforce_room: GlitchTriforceRoom = GlitchTriforceRoom(1) # why is this here? race: Race = Race(0) plando_options: PlandoOptions = PlandoOptions("bosses, connections, texts") diff --git a/worlds/alttp/Rom.py b/worlds/alttp/Rom.py index 11e2f0a37123..08597cea0474 100644 --- a/worlds/alttp/Rom.py +++ b/worlds/alttp/Rom.py @@ -1616,7 +1616,7 @@ def get_reveal_bytes(itemName): rom.write_byte(0xEFD95, digging_game_rng) rom.write_byte(0x1800A3, 0x01) # enable correct world setting behaviour after agahnim kills rom.write_byte(0x1800A4, 0x01 if world.glitches_required[player] != 'no_logic' else 0x00) # enable POD EG fix - rom.write_byte(0x186383, 0x01 if world.glitch_triforce or world.glitches_required[ + rom.write_byte(0x186383, 0x01 if world.glitches_required[ player] == 'no_logic' else 0x00) # disable glitching to Triforce from Ganons Room rom.write_byte(0x180042, 0x01 if world.save_and_quit_from_boss else 0x00) # Allow Save and Quit after boss kill From a4acdb6ddf4092c5fb0a76ddba62020b2f605b62 Mon Sep 17 00:00:00 2001 From: David St-Louis Date: Fri, 19 Apr 2024 17:11:12 -0400 Subject: [PATCH 096/153] DOOM II: var world->multiworld fix and minor doc fix (#3140) --- worlds/doom_ii/Rules.py | 248 ++++++++++++++++---------------- worlds/doom_ii/__init__.py | 4 +- worlds/doom_ii/docs/setup_en.md | 2 +- 3 files changed, 125 insertions(+), 129 deletions(-) diff --git a/worlds/doom_ii/Rules.py b/worlds/doom_ii/Rules.py index 89f3a10f9faf..139733c0eac8 100644 --- a/worlds/doom_ii/Rules.py +++ b/worlds/doom_ii/Rules.py @@ -7,57 +7,53 @@ from . import DOOM2World -def set_episode1_rules(player, world, pro): +def set_episode1_rules(player, multiworld, pro): # Entryway (MAP01) - set_rule(world.get_entrance("Hub -> Entryway (MAP01) Main", player), lambda state: + set_rule(multiworld.get_entrance("Hub -> Entryway (MAP01) Main", player), lambda state: state.has("Entryway (MAP01)", player, 1)) - set_rule(world.get_entrance("Hub -> Entryway (MAP01) Main", player), lambda state: + set_rule(multiworld.get_entrance("Hub -> Entryway (MAP01) Main", player), lambda state: state.has("Entryway (MAP01)", player, 1)) # Underhalls (MAP02) - set_rule(world.get_entrance("Hub -> Underhalls (MAP02) Main", player), lambda state: + set_rule(multiworld.get_entrance("Hub -> Underhalls (MAP02) Main", player), lambda state: state.has("Underhalls (MAP02)", player, 1)) - set_rule(world.get_entrance("Hub -> Underhalls (MAP02) Main", player), lambda state: - state.has("Underhalls (MAP02)", player, 1)) - set_rule(world.get_entrance("Hub -> Underhalls (MAP02) Main", player), lambda state: - state.has("Underhalls (MAP02)", player, 1)) - set_rule(world.get_entrance("Underhalls (MAP02) Main -> Underhalls (MAP02) Red", player), lambda state: + set_rule(multiworld.get_entrance("Underhalls (MAP02) Main -> Underhalls (MAP02) Red", player), lambda state: state.has("Underhalls (MAP02) - Red keycard", player, 1)) - set_rule(world.get_entrance("Underhalls (MAP02) Blue -> Underhalls (MAP02) Red", player), lambda state: + set_rule(multiworld.get_entrance("Underhalls (MAP02) Blue -> Underhalls (MAP02) Red", player), lambda state: state.has("Underhalls (MAP02) - Blue keycard", player, 1)) - set_rule(world.get_entrance("Underhalls (MAP02) Red -> Underhalls (MAP02) Blue", player), lambda state: + set_rule(multiworld.get_entrance("Underhalls (MAP02) Red -> Underhalls (MAP02) Blue", player), lambda state: state.has("Underhalls (MAP02) - Blue keycard", player, 1)) # The Gantlet (MAP03) - set_rule(world.get_entrance("Hub -> The Gantlet (MAP03) Main", player), lambda state: + set_rule(multiworld.get_entrance("Hub -> The Gantlet (MAP03) Main", player), lambda state: (state.has("The Gantlet (MAP03)", player, 1)) and (state.has("Shotgun", player, 1) or state.has("Chaingun", player, 1) or state.has("Super Shotgun", player, 1))) - set_rule(world.get_entrance("The Gantlet (MAP03) Main -> The Gantlet (MAP03) Blue", player), lambda state: + set_rule(multiworld.get_entrance("The Gantlet (MAP03) Main -> The Gantlet (MAP03) Blue", player), lambda state: state.has("The Gantlet (MAP03) - Blue keycard", player, 1)) - set_rule(world.get_entrance("The Gantlet (MAP03) Blue -> The Gantlet (MAP03) Red", player), lambda state: + set_rule(multiworld.get_entrance("The Gantlet (MAP03) Blue -> The Gantlet (MAP03) Red", player), lambda state: state.has("The Gantlet (MAP03) - Red keycard", player, 1)) # The Focus (MAP04) - set_rule(world.get_entrance("Hub -> The Focus (MAP04) Main", player), lambda state: + set_rule(multiworld.get_entrance("Hub -> The Focus (MAP04) Main", player), lambda state: (state.has("The Focus (MAP04)", player, 1)) and (state.has("Shotgun", player, 1) or state.has("Chaingun", player, 1) or state.has("Super Shotgun", player, 1))) - set_rule(world.get_entrance("The Focus (MAP04) Main -> The Focus (MAP04) Red", player), lambda state: + set_rule(multiworld.get_entrance("The Focus (MAP04) Main -> The Focus (MAP04) Red", player), lambda state: state.has("The Focus (MAP04) - Red keycard", player, 1)) - set_rule(world.get_entrance("The Focus (MAP04) Main -> The Focus (MAP04) Blue", player), lambda state: + set_rule(multiworld.get_entrance("The Focus (MAP04) Main -> The Focus (MAP04) Blue", player), lambda state: state.has("The Focus (MAP04) - Blue keycard", player, 1)) - set_rule(world.get_entrance("The Focus (MAP04) Yellow -> The Focus (MAP04) Red", player), lambda state: + set_rule(multiworld.get_entrance("The Focus (MAP04) Yellow -> The Focus (MAP04) Red", player), lambda state: state.has("The Focus (MAP04) - Yellow keycard", player, 1)) - set_rule(world.get_entrance("The Focus (MAP04) Red -> The Focus (MAP04) Yellow", player), lambda state: + set_rule(multiworld.get_entrance("The Focus (MAP04) Red -> The Focus (MAP04) Yellow", player), lambda state: state.has("The Focus (MAP04) - Yellow keycard", player, 1)) - set_rule(world.get_entrance("The Focus (MAP04) Red -> The Focus (MAP04) Main", player), lambda state: + set_rule(multiworld.get_entrance("The Focus (MAP04) Red -> The Focus (MAP04) Main", player), lambda state: state.has("The Focus (MAP04) - Red keycard", player, 1)) # The Waste Tunnels (MAP05) - set_rule(world.get_entrance("Hub -> The Waste Tunnels (MAP05) Main", player), lambda state: + set_rule(multiworld.get_entrance("Hub -> The Waste Tunnels (MAP05) Main", player), lambda state: (state.has("The Waste Tunnels (MAP05)", player, 1) and state.has("Shotgun", player, 1) and state.has("Chaingun", player, 1) and @@ -65,19 +61,19 @@ def set_episode1_rules(player, world, pro): (state.has("Rocket launcher", player, 1) or state.has("Plasma gun", player, 1) or state.has("BFG9000", player, 1))) - set_rule(world.get_entrance("The Waste Tunnels (MAP05) Main -> The Waste Tunnels (MAP05) Red", player), lambda state: + set_rule(multiworld.get_entrance("The Waste Tunnels (MAP05) Main -> The Waste Tunnels (MAP05) Red", player), lambda state: state.has("The Waste Tunnels (MAP05) - Red keycard", player, 1)) - set_rule(world.get_entrance("The Waste Tunnels (MAP05) Main -> The Waste Tunnels (MAP05) Blue", player), lambda state: + set_rule(multiworld.get_entrance("The Waste Tunnels (MAP05) Main -> The Waste Tunnels (MAP05) Blue", player), lambda state: state.has("The Waste Tunnels (MAP05) - Blue keycard", player, 1)) - set_rule(world.get_entrance("The Waste Tunnels (MAP05) Blue -> The Waste Tunnels (MAP05) Yellow", player), lambda state: + set_rule(multiworld.get_entrance("The Waste Tunnels (MAP05) Blue -> The Waste Tunnels (MAP05) Yellow", player), lambda state: state.has("The Waste Tunnels (MAP05) - Yellow keycard", player, 1)) - set_rule(world.get_entrance("The Waste Tunnels (MAP05) Blue -> The Waste Tunnels (MAP05) Main", player), lambda state: + set_rule(multiworld.get_entrance("The Waste Tunnels (MAP05) Blue -> The Waste Tunnels (MAP05) Main", player), lambda state: state.has("The Waste Tunnels (MAP05) - Blue keycard", player, 1)) - set_rule(world.get_entrance("The Waste Tunnels (MAP05) Yellow -> The Waste Tunnels (MAP05) Blue", player), lambda state: + set_rule(multiworld.get_entrance("The Waste Tunnels (MAP05) Yellow -> The Waste Tunnels (MAP05) Blue", player), lambda state: state.has("The Waste Tunnels (MAP05) - Yellow keycard", player, 1)) # The Crusher (MAP06) - set_rule(world.get_entrance("Hub -> The Crusher (MAP06) Main", player), lambda state: + set_rule(multiworld.get_entrance("Hub -> The Crusher (MAP06) Main", player), lambda state: (state.has("The Crusher (MAP06)", player, 1) and state.has("Shotgun", player, 1) and state.has("Chaingun", player, 1) and @@ -85,21 +81,21 @@ def set_episode1_rules(player, world, pro): (state.has("Rocket launcher", player, 1) or state.has("Plasma gun", player, 1) or state.has("BFG9000", player, 1))) - set_rule(world.get_entrance("The Crusher (MAP06) Main -> The Crusher (MAP06) Blue", player), lambda state: + set_rule(multiworld.get_entrance("The Crusher (MAP06) Main -> The Crusher (MAP06) Blue", player), lambda state: state.has("The Crusher (MAP06) - Blue keycard", player, 1)) - set_rule(world.get_entrance("The Crusher (MAP06) Blue -> The Crusher (MAP06) Red", player), lambda state: + set_rule(multiworld.get_entrance("The Crusher (MAP06) Blue -> The Crusher (MAP06) Red", player), lambda state: state.has("The Crusher (MAP06) - Red keycard", player, 1)) - set_rule(world.get_entrance("The Crusher (MAP06) Blue -> The Crusher (MAP06) Main", player), lambda state: + set_rule(multiworld.get_entrance("The Crusher (MAP06) Blue -> The Crusher (MAP06) Main", player), lambda state: state.has("The Crusher (MAP06) - Blue keycard", player, 1)) - set_rule(world.get_entrance("The Crusher (MAP06) Yellow -> The Crusher (MAP06) Red", player), lambda state: + set_rule(multiworld.get_entrance("The Crusher (MAP06) Yellow -> The Crusher (MAP06) Red", player), lambda state: state.has("The Crusher (MAP06) - Yellow keycard", player, 1)) - set_rule(world.get_entrance("The Crusher (MAP06) Red -> The Crusher (MAP06) Yellow", player), lambda state: + set_rule(multiworld.get_entrance("The Crusher (MAP06) Red -> The Crusher (MAP06) Yellow", player), lambda state: state.has("The Crusher (MAP06) - Yellow keycard", player, 1)) - set_rule(world.get_entrance("The Crusher (MAP06) Red -> The Crusher (MAP06) Blue", player), lambda state: + set_rule(multiworld.get_entrance("The Crusher (MAP06) Red -> The Crusher (MAP06) Blue", player), lambda state: state.has("The Crusher (MAP06) - Red keycard", player, 1)) # Dead Simple (MAP07) - set_rule(world.get_entrance("Hub -> Dead Simple (MAP07) Main", player), lambda state: + set_rule(multiworld.get_entrance("Hub -> Dead Simple (MAP07) Main", player), lambda state: (state.has("Dead Simple (MAP07)", player, 1) and state.has("Shotgun", player, 1) and state.has("Chaingun", player, 1) and @@ -109,7 +105,7 @@ def set_episode1_rules(player, world, pro): state.has("BFG9000", player, 1))) # Tricks and Traps (MAP08) - set_rule(world.get_entrance("Hub -> Tricks and Traps (MAP08) Main", player), lambda state: + set_rule(multiworld.get_entrance("Hub -> Tricks and Traps (MAP08) Main", player), lambda state: (state.has("Tricks and Traps (MAP08)", player, 1) and state.has("Shotgun", player, 1) and state.has("Chaingun", player, 1) and @@ -117,13 +113,13 @@ def set_episode1_rules(player, world, pro): (state.has("Rocket launcher", player, 1) or state.has("Plasma gun", player, 1) or state.has("BFG9000", player, 1))) - set_rule(world.get_entrance("Tricks and Traps (MAP08) Main -> Tricks and Traps (MAP08) Red", player), lambda state: + set_rule(multiworld.get_entrance("Tricks and Traps (MAP08) Main -> Tricks and Traps (MAP08) Red", player), lambda state: state.has("Tricks and Traps (MAP08) - Red skull key", player, 1)) - set_rule(world.get_entrance("Tricks and Traps (MAP08) Main -> Tricks and Traps (MAP08) Yellow", player), lambda state: + set_rule(multiworld.get_entrance("Tricks and Traps (MAP08) Main -> Tricks and Traps (MAP08) Yellow", player), lambda state: state.has("Tricks and Traps (MAP08) - Yellow skull key", player, 1)) # The Pit (MAP09) - set_rule(world.get_entrance("Hub -> The Pit (MAP09) Main", player), lambda state: + set_rule(multiworld.get_entrance("Hub -> The Pit (MAP09) Main", player), lambda state: (state.has("The Pit (MAP09)", player, 1) and state.has("Shotgun", player, 1) and state.has("Chaingun", player, 1) and @@ -131,15 +127,15 @@ def set_episode1_rules(player, world, pro): (state.has("Rocket launcher", player, 1) or state.has("Plasma gun", player, 1) or state.has("BFG9000", player, 1))) - set_rule(world.get_entrance("The Pit (MAP09) Main -> The Pit (MAP09) Yellow", player), lambda state: + set_rule(multiworld.get_entrance("The Pit (MAP09) Main -> The Pit (MAP09) Yellow", player), lambda state: state.has("The Pit (MAP09) - Yellow keycard", player, 1)) - set_rule(world.get_entrance("The Pit (MAP09) Main -> The Pit (MAP09) Blue", player), lambda state: + set_rule(multiworld.get_entrance("The Pit (MAP09) Main -> The Pit (MAP09) Blue", player), lambda state: state.has("The Pit (MAP09) - Blue keycard", player, 1)) - set_rule(world.get_entrance("The Pit (MAP09) Yellow -> The Pit (MAP09) Main", player), lambda state: + set_rule(multiworld.get_entrance("The Pit (MAP09) Yellow -> The Pit (MAP09) Main", player), lambda state: state.has("The Pit (MAP09) - Yellow keycard", player, 1)) # Refueling Base (MAP10) - set_rule(world.get_entrance("Hub -> Refueling Base (MAP10) Main", player), lambda state: + set_rule(multiworld.get_entrance("Hub -> Refueling Base (MAP10) Main", player), lambda state: (state.has("Refueling Base (MAP10)", player, 1) and state.has("Shotgun", player, 1) and state.has("Chaingun", player, 1) and @@ -147,13 +143,13 @@ def set_episode1_rules(player, world, pro): (state.has("Rocket launcher", player, 1) or state.has("Plasma gun", player, 1) or state.has("BFG9000", player, 1))) - set_rule(world.get_entrance("Refueling Base (MAP10) Main -> Refueling Base (MAP10) Yellow", player), lambda state: + set_rule(multiworld.get_entrance("Refueling Base (MAP10) Main -> Refueling Base (MAP10) Yellow", player), lambda state: state.has("Refueling Base (MAP10) - Yellow keycard", player, 1)) - set_rule(world.get_entrance("Refueling Base (MAP10) Yellow -> Refueling Base (MAP10) Yellow Blue", player), lambda state: + set_rule(multiworld.get_entrance("Refueling Base (MAP10) Yellow -> Refueling Base (MAP10) Yellow Blue", player), lambda state: state.has("Refueling Base (MAP10) - Blue keycard", player, 1)) # Circle of Death (MAP11) - set_rule(world.get_entrance("Hub -> Circle of Death (MAP11) Main", player), lambda state: + set_rule(multiworld.get_entrance("Hub -> Circle of Death (MAP11) Main", player), lambda state: (state.has("Circle of Death (MAP11)", player, 1) and state.has("Shotgun", player, 1) and state.has("Chaingun", player, 1) and @@ -161,15 +157,15 @@ def set_episode1_rules(player, world, pro): (state.has("Rocket launcher", player, 1) or state.has("Plasma gun", player, 1) or state.has("BFG9000", player, 1))) - set_rule(world.get_entrance("Circle of Death (MAP11) Main -> Circle of Death (MAP11) Blue", player), lambda state: + set_rule(multiworld.get_entrance("Circle of Death (MAP11) Main -> Circle of Death (MAP11) Blue", player), lambda state: state.has("Circle of Death (MAP11) - Blue keycard", player, 1)) - set_rule(world.get_entrance("Circle of Death (MAP11) Main -> Circle of Death (MAP11) Red", player), lambda state: + set_rule(multiworld.get_entrance("Circle of Death (MAP11) Main -> Circle of Death (MAP11) Red", player), lambda state: state.has("Circle of Death (MAP11) - Red keycard", player, 1)) -def set_episode2_rules(player, world, pro): +def set_episode2_rules(player, multiworld, pro): # The Factory (MAP12) - set_rule(world.get_entrance("Hub -> The Factory (MAP12) Main", player), lambda state: + set_rule(multiworld.get_entrance("Hub -> The Factory (MAP12) Main", player), lambda state: (state.has("The Factory (MAP12)", player, 1) and state.has("Shotgun", player, 1) and state.has("Chaingun", player, 1) and @@ -177,13 +173,13 @@ def set_episode2_rules(player, world, pro): (state.has("Rocket launcher", player, 1) or state.has("Plasma gun", player, 1) or state.has("BFG9000", player, 1))) - set_rule(world.get_entrance("The Factory (MAP12) Main -> The Factory (MAP12) Yellow", player), lambda state: + set_rule(multiworld.get_entrance("The Factory (MAP12) Main -> The Factory (MAP12) Yellow", player), lambda state: state.has("The Factory (MAP12) - Yellow keycard", player, 1)) - set_rule(world.get_entrance("The Factory (MAP12) Main -> The Factory (MAP12) Blue", player), lambda state: + set_rule(multiworld.get_entrance("The Factory (MAP12) Main -> The Factory (MAP12) Blue", player), lambda state: state.has("The Factory (MAP12) - Blue keycard", player, 1)) # Downtown (MAP13) - set_rule(world.get_entrance("Hub -> Downtown (MAP13) Main", player), lambda state: + set_rule(multiworld.get_entrance("Hub -> Downtown (MAP13) Main", player), lambda state: (state.has("Downtown (MAP13)", player, 1) and state.has("Shotgun", player, 1) and state.has("Chaingun", player, 1) and @@ -191,15 +187,15 @@ def set_episode2_rules(player, world, pro): (state.has("Rocket launcher", player, 1) or state.has("Plasma gun", player, 1) or state.has("BFG9000", player, 1))) - set_rule(world.get_entrance("Downtown (MAP13) Main -> Downtown (MAP13) Yellow", player), lambda state: + set_rule(multiworld.get_entrance("Downtown (MAP13) Main -> Downtown (MAP13) Yellow", player), lambda state: state.has("Downtown (MAP13) - Yellow keycard", player, 1)) - set_rule(world.get_entrance("Downtown (MAP13) Main -> Downtown (MAP13) Red", player), lambda state: + set_rule(multiworld.get_entrance("Downtown (MAP13) Main -> Downtown (MAP13) Red", player), lambda state: state.has("Downtown (MAP13) - Red keycard", player, 1)) - set_rule(world.get_entrance("Downtown (MAP13) Main -> Downtown (MAP13) Blue", player), lambda state: + set_rule(multiworld.get_entrance("Downtown (MAP13) Main -> Downtown (MAP13) Blue", player), lambda state: state.has("Downtown (MAP13) - Blue keycard", player, 1)) # The Inmost Dens (MAP14) - set_rule(world.get_entrance("Hub -> The Inmost Dens (MAP14) Main", player), lambda state: + set_rule(multiworld.get_entrance("Hub -> The Inmost Dens (MAP14) Main", player), lambda state: (state.has("The Inmost Dens (MAP14)", player, 1) and state.has("Shotgun", player, 1) and state.has("Chaingun", player, 1) and @@ -207,17 +203,17 @@ def set_episode2_rules(player, world, pro): (state.has("Rocket launcher", player, 1) or state.has("Plasma gun", player, 1) or state.has("BFG9000", player, 1))) - set_rule(world.get_entrance("The Inmost Dens (MAP14) Main -> The Inmost Dens (MAP14) Red", player), lambda state: + set_rule(multiworld.get_entrance("The Inmost Dens (MAP14) Main -> The Inmost Dens (MAP14) Red", player), lambda state: state.has("The Inmost Dens (MAP14) - Red skull key", player, 1)) - set_rule(world.get_entrance("The Inmost Dens (MAP14) Blue -> The Inmost Dens (MAP14) Red East", player), lambda state: + set_rule(multiworld.get_entrance("The Inmost Dens (MAP14) Blue -> The Inmost Dens (MAP14) Red East", player), lambda state: state.has("The Inmost Dens (MAP14) - Blue skull key", player, 1)) - set_rule(world.get_entrance("The Inmost Dens (MAP14) Red -> The Inmost Dens (MAP14) Main", player), lambda state: + set_rule(multiworld.get_entrance("The Inmost Dens (MAP14) Red -> The Inmost Dens (MAP14) Main", player), lambda state: state.has("The Inmost Dens (MAP14) - Red skull key", player, 1)) - set_rule(world.get_entrance("The Inmost Dens (MAP14) Red East -> The Inmost Dens (MAP14) Blue", player), lambda state: + set_rule(multiworld.get_entrance("The Inmost Dens (MAP14) Red East -> The Inmost Dens (MAP14) Blue", player), lambda state: state.has("The Inmost Dens (MAP14) - Blue skull key", player, 1)) # Industrial Zone (MAP15) - set_rule(world.get_entrance("Hub -> Industrial Zone (MAP15) Main", player), lambda state: + set_rule(multiworld.get_entrance("Hub -> Industrial Zone (MAP15) Main", player), lambda state: (state.has("Industrial Zone (MAP15)", player, 1) and state.has("Shotgun", player, 1) and state.has("Chaingun", player, 1) and @@ -225,17 +221,17 @@ def set_episode2_rules(player, world, pro): (state.has("Rocket launcher", player, 1) or state.has("Plasma gun", player, 1) or state.has("BFG9000", player, 1))) - set_rule(world.get_entrance("Industrial Zone (MAP15) Main -> Industrial Zone (MAP15) Yellow East", player), lambda state: + set_rule(multiworld.get_entrance("Industrial Zone (MAP15) Main -> Industrial Zone (MAP15) Yellow East", player), lambda state: state.has("Industrial Zone (MAP15) - Yellow keycard", player, 1)) - set_rule(world.get_entrance("Industrial Zone (MAP15) Main -> Industrial Zone (MAP15) Yellow West", player), lambda state: + set_rule(multiworld.get_entrance("Industrial Zone (MAP15) Main -> Industrial Zone (MAP15) Yellow West", player), lambda state: state.has("Industrial Zone (MAP15) - Yellow keycard", player, 1)) - set_rule(world.get_entrance("Industrial Zone (MAP15) Blue -> Industrial Zone (MAP15) Yellow East", player), lambda state: + set_rule(multiworld.get_entrance("Industrial Zone (MAP15) Blue -> Industrial Zone (MAP15) Yellow East", player), lambda state: state.has("Industrial Zone (MAP15) - Blue keycard", player, 1)) - set_rule(world.get_entrance("Industrial Zone (MAP15) Yellow East -> Industrial Zone (MAP15) Blue", player), lambda state: + set_rule(multiworld.get_entrance("Industrial Zone (MAP15) Yellow East -> Industrial Zone (MAP15) Blue", player), lambda state: state.has("Industrial Zone (MAP15) - Blue keycard", player, 1)) # Suburbs (MAP16) - set_rule(world.get_entrance("Hub -> Suburbs (MAP16) Main", player), lambda state: + set_rule(multiworld.get_entrance("Hub -> Suburbs (MAP16) Main", player), lambda state: (state.has("Suburbs (MAP16)", player, 1) and state.has("Shotgun", player, 1) and state.has("Chaingun", player, 1) and @@ -243,13 +239,13 @@ def set_episode2_rules(player, world, pro): (state.has("Rocket launcher", player, 1) or state.has("Plasma gun", player, 1) or state.has("BFG9000", player, 1))) - set_rule(world.get_entrance("Suburbs (MAP16) Main -> Suburbs (MAP16) Red", player), lambda state: + set_rule(multiworld.get_entrance("Suburbs (MAP16) Main -> Suburbs (MAP16) Red", player), lambda state: state.has("Suburbs (MAP16) - Red skull key", player, 1)) - set_rule(world.get_entrance("Suburbs (MAP16) Main -> Suburbs (MAP16) Blue", player), lambda state: + set_rule(multiworld.get_entrance("Suburbs (MAP16) Main -> Suburbs (MAP16) Blue", player), lambda state: state.has("Suburbs (MAP16) - Blue skull key", player, 1)) # Tenements (MAP17) - set_rule(world.get_entrance("Hub -> Tenements (MAP17) Main", player), lambda state: + set_rule(multiworld.get_entrance("Hub -> Tenements (MAP17) Main", player), lambda state: (state.has("Tenements (MAP17)", player, 1) and state.has("Shotgun", player, 1) and state.has("Chaingun", player, 1) and @@ -257,15 +253,15 @@ def set_episode2_rules(player, world, pro): (state.has("Rocket launcher", player, 1) or state.has("Plasma gun", player, 1) or state.has("BFG9000", player, 1))) - set_rule(world.get_entrance("Tenements (MAP17) Main -> Tenements (MAP17) Red", player), lambda state: + set_rule(multiworld.get_entrance("Tenements (MAP17) Main -> Tenements (MAP17) Red", player), lambda state: state.has("Tenements (MAP17) - Red keycard", player, 1)) - set_rule(world.get_entrance("Tenements (MAP17) Red -> Tenements (MAP17) Yellow", player), lambda state: + set_rule(multiworld.get_entrance("Tenements (MAP17) Red -> Tenements (MAP17) Yellow", player), lambda state: state.has("Tenements (MAP17) - Yellow skull key", player, 1)) - set_rule(world.get_entrance("Tenements (MAP17) Red -> Tenements (MAP17) Blue", player), lambda state: + set_rule(multiworld.get_entrance("Tenements (MAP17) Red -> Tenements (MAP17) Blue", player), lambda state: state.has("Tenements (MAP17) - Blue keycard", player, 1)) # The Courtyard (MAP18) - set_rule(world.get_entrance("Hub -> The Courtyard (MAP18) Main", player), lambda state: + set_rule(multiworld.get_entrance("Hub -> The Courtyard (MAP18) Main", player), lambda state: (state.has("The Courtyard (MAP18)", player, 1) and state.has("Shotgun", player, 1) and state.has("Chaingun", player, 1) and @@ -273,17 +269,17 @@ def set_episode2_rules(player, world, pro): (state.has("Rocket launcher", player, 1) or state.has("Plasma gun", player, 1) or state.has("BFG9000", player, 1))) - set_rule(world.get_entrance("The Courtyard (MAP18) Main -> The Courtyard (MAP18) Yellow", player), lambda state: + set_rule(multiworld.get_entrance("The Courtyard (MAP18) Main -> The Courtyard (MAP18) Yellow", player), lambda state: state.has("The Courtyard (MAP18) - Yellow skull key", player, 1)) - set_rule(world.get_entrance("The Courtyard (MAP18) Main -> The Courtyard (MAP18) Blue", player), lambda state: + set_rule(multiworld.get_entrance("The Courtyard (MAP18) Main -> The Courtyard (MAP18) Blue", player), lambda state: state.has("The Courtyard (MAP18) - Blue skull key", player, 1)) - set_rule(world.get_entrance("The Courtyard (MAP18) Blue -> The Courtyard (MAP18) Main", player), lambda state: + set_rule(multiworld.get_entrance("The Courtyard (MAP18) Blue -> The Courtyard (MAP18) Main", player), lambda state: state.has("The Courtyard (MAP18) - Blue skull key", player, 1)) - set_rule(world.get_entrance("The Courtyard (MAP18) Yellow -> The Courtyard (MAP18) Main", player), lambda state: + set_rule(multiworld.get_entrance("The Courtyard (MAP18) Yellow -> The Courtyard (MAP18) Main", player), lambda state: state.has("The Courtyard (MAP18) - Yellow skull key", player, 1)) # The Citadel (MAP19) - set_rule(world.get_entrance("Hub -> The Citadel (MAP19) Main", player), lambda state: + set_rule(multiworld.get_entrance("Hub -> The Citadel (MAP19) Main", player), lambda state: (state.has("The Citadel (MAP19)", player, 1) and state.has("Shotgun", player, 1) and state.has("Chaingun", player, 1) and @@ -291,15 +287,15 @@ def set_episode2_rules(player, world, pro): (state.has("Rocket launcher", player, 1) or state.has("Plasma gun", player, 1) or state.has("BFG9000", player, 1))) - set_rule(world.get_entrance("The Citadel (MAP19) Main -> The Citadel (MAP19) Red", player), lambda state: + set_rule(multiworld.get_entrance("The Citadel (MAP19) Main -> The Citadel (MAP19) Red", player), lambda state: (state.has("The Citadel (MAP19) - Red skull key", player, 1)) and (state.has("The Citadel (MAP19) - Blue skull key", player, 1) or state.has("The Citadel (MAP19) - Yellow skull key", player, 1))) - set_rule(world.get_entrance("The Citadel (MAP19) Red -> The Citadel (MAP19) Main", player), lambda state: + set_rule(multiworld.get_entrance("The Citadel (MAP19) Red -> The Citadel (MAP19) Main", player), lambda state: (state.has("The Citadel (MAP19) - Red skull key", player, 1)) and (state.has("The Citadel (MAP19) - Yellow skull key", player, 1) or state.has("The Citadel (MAP19) - Blue skull key", player, 1))) # Gotcha! (MAP20) - set_rule(world.get_entrance("Hub -> Gotcha! (MAP20) Main", player), lambda state: + set_rule(multiworld.get_entrance("Hub -> Gotcha! (MAP20) Main", player), lambda state: (state.has("Gotcha! (MAP20)", player, 1) and state.has("Shotgun", player, 1) and state.has("Chaingun", player, 1) and @@ -309,9 +305,9 @@ def set_episode2_rules(player, world, pro): state.has("BFG9000", player, 1))) -def set_episode3_rules(player, world, pro): +def set_episode3_rules(player, multiworld, pro): # Nirvana (MAP21) - set_rule(world.get_entrance("Hub -> Nirvana (MAP21) Main", player), lambda state: + set_rule(multiworld.get_entrance("Hub -> Nirvana (MAP21) Main", player), lambda state: (state.has("Nirvana (MAP21)", player, 1) and state.has("Shotgun", player, 1) and state.has("Chaingun", player, 1) and @@ -319,19 +315,19 @@ def set_episode3_rules(player, world, pro): (state.has("Rocket launcher", player, 1) or state.has("Plasma gun", player, 1) or state.has("BFG9000", player, 1))) - set_rule(world.get_entrance("Nirvana (MAP21) Main -> Nirvana (MAP21) Yellow", player), lambda state: + set_rule(multiworld.get_entrance("Nirvana (MAP21) Main -> Nirvana (MAP21) Yellow", player), lambda state: state.has("Nirvana (MAP21) - Yellow skull key", player, 1)) - set_rule(world.get_entrance("Nirvana (MAP21) Yellow -> Nirvana (MAP21) Main", player), lambda state: + set_rule(multiworld.get_entrance("Nirvana (MAP21) Yellow -> Nirvana (MAP21) Main", player), lambda state: state.has("Nirvana (MAP21) - Yellow skull key", player, 1)) - set_rule(world.get_entrance("Nirvana (MAP21) Yellow -> Nirvana (MAP21) Magenta", player), lambda state: + set_rule(multiworld.get_entrance("Nirvana (MAP21) Yellow -> Nirvana (MAP21) Magenta", player), lambda state: state.has("Nirvana (MAP21) - Red skull key", player, 1) and state.has("Nirvana (MAP21) - Blue skull key", player, 1)) - set_rule(world.get_entrance("Nirvana (MAP21) Magenta -> Nirvana (MAP21) Yellow", player), lambda state: + set_rule(multiworld.get_entrance("Nirvana (MAP21) Magenta -> Nirvana (MAP21) Yellow", player), lambda state: state.has("Nirvana (MAP21) - Red skull key", player, 1) and state.has("Nirvana (MAP21) - Blue skull key", player, 1)) # The Catacombs (MAP22) - set_rule(world.get_entrance("Hub -> The Catacombs (MAP22) Main", player), lambda state: + set_rule(multiworld.get_entrance("Hub -> The Catacombs (MAP22) Main", player), lambda state: (state.has("The Catacombs (MAP22)", player, 1) and state.has("Shotgun", player, 1) and state.has("Chaingun", player, 1) and @@ -339,15 +335,15 @@ def set_episode3_rules(player, world, pro): (state.has("BFG9000", player, 1) or state.has("Rocket launcher", player, 1) or state.has("Plasma gun", player, 1))) - set_rule(world.get_entrance("The Catacombs (MAP22) Main -> The Catacombs (MAP22) Blue", player), lambda state: + set_rule(multiworld.get_entrance("The Catacombs (MAP22) Main -> The Catacombs (MAP22) Blue", player), lambda state: state.has("The Catacombs (MAP22) - Blue skull key", player, 1)) - set_rule(world.get_entrance("The Catacombs (MAP22) Main -> The Catacombs (MAP22) Red", player), lambda state: + set_rule(multiworld.get_entrance("The Catacombs (MAP22) Main -> The Catacombs (MAP22) Red", player), lambda state: state.has("The Catacombs (MAP22) - Red skull key", player, 1)) - set_rule(world.get_entrance("The Catacombs (MAP22) Red -> The Catacombs (MAP22) Main", player), lambda state: + set_rule(multiworld.get_entrance("The Catacombs (MAP22) Red -> The Catacombs (MAP22) Main", player), lambda state: state.has("The Catacombs (MAP22) - Red skull key", player, 1)) # Barrels o Fun (MAP23) - set_rule(world.get_entrance("Hub -> Barrels o Fun (MAP23) Main", player), lambda state: + set_rule(multiworld.get_entrance("Hub -> Barrels o Fun (MAP23) Main", player), lambda state: (state.has("Barrels o Fun (MAP23)", player, 1) and state.has("Shotgun", player, 1) and state.has("Chaingun", player, 1) and @@ -355,13 +351,13 @@ def set_episode3_rules(player, world, pro): (state.has("Rocket launcher", player, 1) or state.has("Plasma gun", player, 1) or state.has("BFG9000", player, 1))) - set_rule(world.get_entrance("Barrels o Fun (MAP23) Main -> Barrels o Fun (MAP23) Yellow", player), lambda state: + set_rule(multiworld.get_entrance("Barrels o Fun (MAP23) Main -> Barrels o Fun (MAP23) Yellow", player), lambda state: state.has("Barrels o Fun (MAP23) - Yellow skull key", player, 1)) - set_rule(world.get_entrance("Barrels o Fun (MAP23) Yellow -> Barrels o Fun (MAP23) Main", player), lambda state: + set_rule(multiworld.get_entrance("Barrels o Fun (MAP23) Yellow -> Barrels o Fun (MAP23) Main", player), lambda state: state.has("Barrels o Fun (MAP23) - Yellow skull key", player, 1)) # The Chasm (MAP24) - set_rule(world.get_entrance("Hub -> The Chasm (MAP24) Main", player), lambda state: + set_rule(multiworld.get_entrance("Hub -> The Chasm (MAP24) Main", player), lambda state: state.has("The Chasm (MAP24)", player, 1) and state.has("Shotgun", player, 1) and state.has("Chaingun", player, 1) and @@ -369,13 +365,13 @@ def set_episode3_rules(player, world, pro): state.has("Plasma gun", player, 1) and state.has("BFG9000", player, 1) and state.has("Super Shotgun", player, 1)) - set_rule(world.get_entrance("The Chasm (MAP24) Main -> The Chasm (MAP24) Red", player), lambda state: + set_rule(multiworld.get_entrance("The Chasm (MAP24) Main -> The Chasm (MAP24) Red", player), lambda state: state.has("The Chasm (MAP24) - Red keycard", player, 1)) - set_rule(world.get_entrance("The Chasm (MAP24) Red -> The Chasm (MAP24) Main", player), lambda state: + set_rule(multiworld.get_entrance("The Chasm (MAP24) Red -> The Chasm (MAP24) Main", player), lambda state: state.has("The Chasm (MAP24) - Red keycard", player, 1)) # Bloodfalls (MAP25) - set_rule(world.get_entrance("Hub -> Bloodfalls (MAP25) Main", player), lambda state: + set_rule(multiworld.get_entrance("Hub -> Bloodfalls (MAP25) Main", player), lambda state: state.has("Bloodfalls (MAP25)", player, 1) and state.has("Shotgun", player, 1) and state.has("Chaingun", player, 1) and @@ -383,13 +379,13 @@ def set_episode3_rules(player, world, pro): state.has("Plasma gun", player, 1) and state.has("BFG9000", player, 1) and state.has("Super Shotgun", player, 1)) - set_rule(world.get_entrance("Bloodfalls (MAP25) Main -> Bloodfalls (MAP25) Blue", player), lambda state: + set_rule(multiworld.get_entrance("Bloodfalls (MAP25) Main -> Bloodfalls (MAP25) Blue", player), lambda state: state.has("Bloodfalls (MAP25) - Blue skull key", player, 1)) - set_rule(world.get_entrance("Bloodfalls (MAP25) Blue -> Bloodfalls (MAP25) Main", player), lambda state: + set_rule(multiworld.get_entrance("Bloodfalls (MAP25) Blue -> Bloodfalls (MAP25) Main", player), lambda state: state.has("Bloodfalls (MAP25) - Blue skull key", player, 1)) # The Abandoned Mines (MAP26) - set_rule(world.get_entrance("Hub -> The Abandoned Mines (MAP26) Main", player), lambda state: + set_rule(multiworld.get_entrance("Hub -> The Abandoned Mines (MAP26) Main", player), lambda state: state.has("The Abandoned Mines (MAP26)", player, 1) and state.has("Shotgun", player, 1) and state.has("Chaingun", player, 1) and @@ -397,19 +393,19 @@ def set_episode3_rules(player, world, pro): state.has("BFG9000", player, 1) and state.has("Plasma gun", player, 1) and state.has("Super Shotgun", player, 1)) - set_rule(world.get_entrance("The Abandoned Mines (MAP26) Main -> The Abandoned Mines (MAP26) Yellow", player), lambda state: + set_rule(multiworld.get_entrance("The Abandoned Mines (MAP26) Main -> The Abandoned Mines (MAP26) Yellow", player), lambda state: state.has("The Abandoned Mines (MAP26) - Yellow keycard", player, 1)) - set_rule(world.get_entrance("The Abandoned Mines (MAP26) Main -> The Abandoned Mines (MAP26) Red", player), lambda state: + set_rule(multiworld.get_entrance("The Abandoned Mines (MAP26) Main -> The Abandoned Mines (MAP26) Red", player), lambda state: state.has("The Abandoned Mines (MAP26) - Red keycard", player, 1)) - set_rule(world.get_entrance("The Abandoned Mines (MAP26) Main -> The Abandoned Mines (MAP26) Blue", player), lambda state: + set_rule(multiworld.get_entrance("The Abandoned Mines (MAP26) Main -> The Abandoned Mines (MAP26) Blue", player), lambda state: state.has("The Abandoned Mines (MAP26) - Blue keycard", player, 1)) - set_rule(world.get_entrance("The Abandoned Mines (MAP26) Blue -> The Abandoned Mines (MAP26) Main", player), lambda state: + set_rule(multiworld.get_entrance("The Abandoned Mines (MAP26) Blue -> The Abandoned Mines (MAP26) Main", player), lambda state: state.has("The Abandoned Mines (MAP26) - Blue keycard", player, 1)) - set_rule(world.get_entrance("The Abandoned Mines (MAP26) Yellow -> The Abandoned Mines (MAP26) Main", player), lambda state: + set_rule(multiworld.get_entrance("The Abandoned Mines (MAP26) Yellow -> The Abandoned Mines (MAP26) Main", player), lambda state: state.has("The Abandoned Mines (MAP26) - Yellow keycard", player, 1)) # Monster Condo (MAP27) - set_rule(world.get_entrance("Hub -> Monster Condo (MAP27) Main", player), lambda state: + set_rule(multiworld.get_entrance("Hub -> Monster Condo (MAP27) Main", player), lambda state: state.has("Monster Condo (MAP27)", player, 1) and state.has("Shotgun", player, 1) and state.has("Chaingun", player, 1) and @@ -417,17 +413,17 @@ def set_episode3_rules(player, world, pro): state.has("Plasma gun", player, 1) and state.has("BFG9000", player, 1) and state.has("Super Shotgun", player, 1)) - set_rule(world.get_entrance("Monster Condo (MAP27) Main -> Monster Condo (MAP27) Yellow", player), lambda state: + set_rule(multiworld.get_entrance("Monster Condo (MAP27) Main -> Monster Condo (MAP27) Yellow", player), lambda state: state.has("Monster Condo (MAP27) - Yellow skull key", player, 1)) - set_rule(world.get_entrance("Monster Condo (MAP27) Main -> Monster Condo (MAP27) Red", player), lambda state: + set_rule(multiworld.get_entrance("Monster Condo (MAP27) Main -> Monster Condo (MAP27) Red", player), lambda state: state.has("Monster Condo (MAP27) - Red skull key", player, 1)) - set_rule(world.get_entrance("Monster Condo (MAP27) Main -> Monster Condo (MAP27) Blue", player), lambda state: + set_rule(multiworld.get_entrance("Monster Condo (MAP27) Main -> Monster Condo (MAP27) Blue", player), lambda state: state.has("Monster Condo (MAP27) - Blue skull key", player, 1)) - set_rule(world.get_entrance("Monster Condo (MAP27) Red -> Monster Condo (MAP27) Main", player), lambda state: + set_rule(multiworld.get_entrance("Monster Condo (MAP27) Red -> Monster Condo (MAP27) Main", player), lambda state: state.has("Monster Condo (MAP27) - Red skull key", player, 1)) # The Spirit World (MAP28) - set_rule(world.get_entrance("Hub -> The Spirit World (MAP28) Main", player), lambda state: + set_rule(multiworld.get_entrance("Hub -> The Spirit World (MAP28) Main", player), lambda state: state.has("The Spirit World (MAP28)", player, 1) and state.has("Shotgun", player, 1) and state.has("Rocket launcher", player, 1) and @@ -435,17 +431,17 @@ def set_episode3_rules(player, world, pro): state.has("Plasma gun", player, 1) and state.has("BFG9000", player, 1) and state.has("Super Shotgun", player, 1)) - set_rule(world.get_entrance("The Spirit World (MAP28) Main -> The Spirit World (MAP28) Yellow", player), lambda state: + set_rule(multiworld.get_entrance("The Spirit World (MAP28) Main -> The Spirit World (MAP28) Yellow", player), lambda state: state.has("The Spirit World (MAP28) - Yellow skull key", player, 1)) - set_rule(world.get_entrance("The Spirit World (MAP28) Main -> The Spirit World (MAP28) Red", player), lambda state: + set_rule(multiworld.get_entrance("The Spirit World (MAP28) Main -> The Spirit World (MAP28) Red", player), lambda state: state.has("The Spirit World (MAP28) - Red skull key", player, 1)) - set_rule(world.get_entrance("The Spirit World (MAP28) Yellow -> The Spirit World (MAP28) Main", player), lambda state: + set_rule(multiworld.get_entrance("The Spirit World (MAP28) Yellow -> The Spirit World (MAP28) Main", player), lambda state: state.has("The Spirit World (MAP28) - Yellow skull key", player, 1)) - set_rule(world.get_entrance("The Spirit World (MAP28) Red -> The Spirit World (MAP28) Main", player), lambda state: + set_rule(multiworld.get_entrance("The Spirit World (MAP28) Red -> The Spirit World (MAP28) Main", player), lambda state: state.has("The Spirit World (MAP28) - Red skull key", player, 1)) # The Living End (MAP29) - set_rule(world.get_entrance("Hub -> The Living End (MAP29) Main", player), lambda state: + set_rule(multiworld.get_entrance("Hub -> The Living End (MAP29) Main", player), lambda state: state.has("The Living End (MAP29)", player, 1) and state.has("Shotgun", player, 1) and state.has("Chaingun", player, 1) and @@ -455,7 +451,7 @@ def set_episode3_rules(player, world, pro): state.has("Super Shotgun", player, 1)) # Icon of Sin (MAP30) - set_rule(world.get_entrance("Hub -> Icon of Sin (MAP30) Main", player), lambda state: + set_rule(multiworld.get_entrance("Hub -> Icon of Sin (MAP30) Main", player), lambda state: state.has("Icon of Sin (MAP30)", player, 1) and state.has("Rocket launcher", player, 1) and state.has("Shotgun", player, 1) and @@ -465,9 +461,9 @@ def set_episode3_rules(player, world, pro): state.has("Super Shotgun", player, 1)) -def set_episode4_rules(player, world, pro): +def set_episode4_rules(player, multiworld, pro): # Wolfenstein2 (MAP31) - set_rule(world.get_entrance("Hub -> Wolfenstein2 (MAP31) Main", player), lambda state: + set_rule(multiworld.get_entrance("Hub -> Wolfenstein2 (MAP31) Main", player), lambda state: (state.has("Wolfenstein2 (MAP31)", player, 1) and state.has("Shotgun", player, 1) and state.has("Chaingun", player, 1) and @@ -477,7 +473,7 @@ def set_episode4_rules(player, world, pro): state.has("BFG9000", player, 1))) # Grosse2 (MAP32) - set_rule(world.get_entrance("Hub -> Grosse2 (MAP32) Main", player), lambda state: + set_rule(multiworld.get_entrance("Hub -> Grosse2 (MAP32) Main", player), lambda state: (state.has("Grosse2 (MAP32)", player, 1) and state.has("Shotgun", player, 1) and state.has("Chaingun", player, 1) and @@ -489,13 +485,13 @@ def set_episode4_rules(player, world, pro): def set_rules(doom_ii_world: "DOOM2World", included_episodes, pro): player = doom_ii_world.player - world = doom_ii_world.multiworld + multiworld = doom_ii_world.multiworld if included_episodes[0]: - set_episode1_rules(player, world, pro) + set_episode1_rules(player, multiworld, pro) if included_episodes[1]: - set_episode2_rules(player, world, pro) + set_episode2_rules(player, multiworld, pro) if included_episodes[2]: - set_episode3_rules(player, world, pro) + set_episode3_rules(player, multiworld, pro) if included_episodes[3]: - set_episode4_rules(player, world, pro) + set_episode4_rules(player, multiworld, pro) diff --git a/worlds/doom_ii/__init__.py b/worlds/doom_ii/__init__.py index 22dee2ab743e..591c472e4005 100644 --- a/worlds/doom_ii/__init__.py +++ b/worlds/doom_ii/__init__.py @@ -74,11 +74,11 @@ class DOOM2World(World): "Energy cell pack": 10 } - def __init__(self, world: MultiWorld, player: int): + def __init__(self, multiworld: MultiWorld, player: int): self.included_episodes = [1, 1, 1, 0] self.location_count = 0 - super().__init__(world, player) + super().__init__(multiworld, player) def get_episode_count(self): # Don't include 4th, those are secret levels they are additive diff --git a/worlds/doom_ii/docs/setup_en.md b/worlds/doom_ii/docs/setup_en.md index 321d440ea68b..87054ab30783 100644 --- a/worlds/doom_ii/docs/setup_en.md +++ b/worlds/doom_ii/docs/setup_en.md @@ -13,7 +13,7 @@ 1. Download [APDOOM.zip](https://github.com/Daivuk/apdoom/releases) and extract it. 2. Copy DOOM2.WAD from your steam install into the extracted folder. You can find the folder in steam by finding the game in your library, - right clicking it and choosing *Manage→Browse Local Files*. + right clicking it and choosing *Manage→Browse Local Files*. The WAD file is in the `/base/` folder. ## Joining a MultiWorld Game From 0a1ce5b7d8f58341eb34e874332f5f449c5b0af8 Mon Sep 17 00:00:00 2001 From: Zach Parks Date: Sat, 20 Apr 2024 13:18:06 -0500 Subject: [PATCH 097/153] ALTTP: Updates to player-specific game tracker. (#3133) --- WebHostLib/static/assets/lttp-tracker.js | 20 -- WebHostLib/static/styles/lttp-tracker.css | 75 ---- .../static/styles/tracker__ALinkToThePast.css | 142 ++++++++ WebHostLib/templates/lttpTracker.html | 86 ----- .../templates/tracker__ALinkToThePast.html | 334 +++++++++++------- WebHostLib/tracker.py | 329 ++++++++--------- 6 files changed, 488 insertions(+), 498 deletions(-) delete mode 100644 WebHostLib/static/assets/lttp-tracker.js delete mode 100644 WebHostLib/static/styles/lttp-tracker.css create mode 100644 WebHostLib/static/styles/tracker__ALinkToThePast.css delete mode 100644 WebHostLib/templates/lttpTracker.html diff --git a/WebHostLib/static/assets/lttp-tracker.js b/WebHostLib/static/assets/lttp-tracker.js deleted file mode 100644 index 3f01f93cd38c..000000000000 --- a/WebHostLib/static/assets/lttp-tracker.js +++ /dev/null @@ -1,20 +0,0 @@ -window.addEventListener('load', () => { - const url = window.location; - setInterval(() => { - const ajax = new XMLHttpRequest(); - ajax.onreadystatechange = () => { - if (ajax.readyState !== 4) { return; } - - // Create a fake DOM using the returned HTML - const domParser = new DOMParser(); - const fakeDOM = domParser.parseFromString(ajax.responseText, 'text/html'); - - // Update item and location trackers - document.getElementById('inventory-table').innerHTML = fakeDOM.getElementById('inventory-table').innerHTML; - document.getElementById('location-table').innerHTML = fakeDOM.getElementById('location-table').innerHTML; - - }; - ajax.open('GET', url); - ajax.send(); - }, 15000) -}); diff --git a/WebHostLib/static/styles/lttp-tracker.css b/WebHostLib/static/styles/lttp-tracker.css deleted file mode 100644 index 899a8f695925..000000000000 --- a/WebHostLib/static/styles/lttp-tracker.css +++ /dev/null @@ -1,75 +0,0 @@ -#player-tracker-wrapper{ - margin: 0; - font-family: LexendDeca-Light, sans-serif; - color: white; - font-size: 14px; -} - -#inventory-table{ - border-top: 2px solid #000000; - border-left: 2px solid #000000; - border-right: 2px solid #000000; - border-top-left-radius: 4px; - border-top-right-radius: 4px; - padding: 3px 3px 10px; - width: 284px; - background-color: #42b149; -} - -#inventory-table td{ - width: 40px; - height: 40px; - text-align: center; - vertical-align: middle; -} - -#inventory-table img{ - height: 100%; - max-width: 40px; - max-height: 40px; - filter: grayscale(100%) contrast(75%) brightness(75%); -} - -#inventory-table img.acquired{ - filter: none; -} - -#inventory-table img.powder-fix{ - width: 35px; - height: 35px; -} - -#location-table{ - width: 284px; - border-left: 2px solid #000000; - border-right: 2px solid #000000; - border-bottom: 2px solid #000000; - border-bottom-left-radius: 4px; - border-bottom-right-radius: 4px; - background-color: #42b149; - padding: 0 3px 3px; -} - -#location-table th{ - vertical-align: middle; - text-align: center; - padding-right: 10px; -} - -#location-table td{ - padding-top: 2px; - padding-bottom: 2px; - padding-right: 5px; - line-height: 20px; -} - -#location-table td.counter{ - padding-right: 8px; - text-align: right; -} - -#location-table img{ - height: 100%; - max-width: 30px; - max-height: 30px; -} diff --git a/WebHostLib/static/styles/tracker__ALinkToThePast.css b/WebHostLib/static/styles/tracker__ALinkToThePast.css new file mode 100644 index 000000000000..db5dfcbdfed7 --- /dev/null +++ b/WebHostLib/static/styles/tracker__ALinkToThePast.css @@ -0,0 +1,142 @@ +@import url('https://fonts.googleapis.com/css2?family=Lexend+Deca:wght@100..900&display=swap'); + +.tracker-container { + width: 440px; + box-sizing: border-box; + font-family: "Lexend Deca", Arial, Helvetica, sans-serif; + border: 2px solid black; + border-radius: 4px; + resize: both; + + background-color: #42b149; + color: white; +} + +.hidden { + visibility: hidden; +} + +/** Inventory Grid ****************************************************************************************************/ +.inventory-grid { + display: grid; + grid-template-columns: repeat(6, minmax(0, 1fr)); + padding: 1rem; + gap: 1rem; +} + +.inventory-grid .item { + position: relative; + display: flex; + justify-content: center; + height: 48px; +} + +.inventory-grid .dual-item { + display: flex; + justify-content: center; +} + +.inventory-grid .missing { + /* Missing items will be in full grayscale to signify "uncollected". */ + filter: grayscale(100%) contrast(75%) brightness(75%); +} + +.inventory-grid .item img, +.inventory-grid .dual-item img { + display: flex; + align-items: center; + text-align: center; + font-size: 0.8rem; + text-shadow: 0 1px 2px black; + font-weight: bold; + image-rendering: crisp-edges; + background-size: contain; + background-repeat: no-repeat; +} + +.inventory-grid .dual-item img { + height: 48px; + margin: 0 -4px; +} + +.inventory-grid .dual-item img:first-child { + align-self: flex-end; +} + +.inventory-grid .item .quantity { + position: absolute; + bottom: 0; + right: 0; + text-align: right; + font-weight: 600; + font-size: 1.75rem; + line-height: 1.75rem; + text-shadow: + -1px -1px 0 #000, + 1px -1px 0 #000, + -1px 1px 0 #000, + 1px 1px 0 #000; + user-select: none; +} + +/** Regions List ******************************************************************************************************/ +.regions-list { + padding: 1rem; +} + +.regions-list summary { + list-style: none; + display: flex; + gap: 0.5rem; + cursor: pointer; +} + +.regions-list summary::before { + content: "⯈"; + width: 1em; + flex-shrink: 0; +} + +.regions-list details { + font-weight: 300; +} + +.regions-list details[open] > summary::before { + content: "⯆"; +} + +.regions-list .region { + width: 100%; + display: grid; + grid-template-columns: 20fr 8fr 2fr 2fr; + align-items: center; + gap: 4px; + text-align: center; + font-weight: 300; + box-sizing: border-box; +} + +.regions-list .region :first-child { + text-align: left; + font-weight: 500; +} + +.regions-list .region.region-header { + margin-left: 24px; + width: calc(100% - 24px); + padding: 2px; +} + +.regions-list .location-rows { + border-top: 1px solid white; + display: grid; + grid-template-columns: auto 32px; + font-weight: 300; + padding: 2px 8px; + margin-top: 4px; + font-size: 0.8rem; +} + +.regions-list .location-rows :nth-child(even) { + text-align: right; +} diff --git a/WebHostLib/templates/lttpTracker.html b/WebHostLib/templates/lttpTracker.html deleted file mode 100644 index 3f1c35793eeb..000000000000 --- a/WebHostLib/templates/lttpTracker.html +++ /dev/null @@ -1,86 +0,0 @@ - - - - {{ player_name }}'s Tracker - - - - - - -
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
- - - - - {% if key_locations and "Universal" not in key_locations %} - - {% endif %} - {% if big_key_locations %} - - {% endif %} - - {% for area in sp_areas %} - - - - {% if key_locations and "Universal" not in key_locations %} - - {% endif %} - {% if big_key_locations %} - - {% endif %} - - {% endfor %} -
{{ area }}{{ checks_done[area] }} / {{ checks_in_area[area] }} - {{ inventory[small_key_ids[area]] if area in key_locations else '—' }} - - {{ '✔' if area in big_key_locations and inventory[big_key_ids[area]] else ('—' if area not in big_key_locations else '') }} -
-
- - diff --git a/WebHostLib/templates/tracker__ALinkToThePast.html b/WebHostLib/templates/tracker__ALinkToThePast.html index b7bae26fd35b..13a83a344765 100644 --- a/WebHostLib/templates/tracker__ALinkToThePast.html +++ b/WebHostLib/templates/tracker__ALinkToThePast.html @@ -1,73 +1,89 @@ -{%- set icons = { - "Blue Shield": "https://www.zeldadungeon.net/wiki/images/8/85/Fighters-Shield.png", - "Red Shield": "https://www.zeldadungeon.net/wiki/images/5/55/Fire-Shield.png", - "Mirror Shield": "https://www.zeldadungeon.net/wiki/images/8/84/Mirror-Shield.png", - "Fighter Sword": "https://oyster.ignimgs.com/mediawiki/apis.ign.com/the-legend-of-zelda-a-link-to-the-past/4/40/SFighterSword.png?width=1920", - "Master Sword": "https://oyster.ignimgs.com/mediawiki/apis.ign.com/the-legend-of-zelda-a-link-to-the-past/6/65/SMasterSword.png?width=1920", - "Tempered Sword": "https://oyster.ignimgs.com/mediawiki/apis.ign.com/the-legend-of-zelda-a-link-to-the-past/9/92/STemperedSword.png?width=1920", - "Golden Sword": "https://oyster.ignimgs.com/mediawiki/apis.ign.com/the-legend-of-zelda-a-link-to-the-past/2/28/SGoldenSword.png?width=1920", - "Bow": "https://gamepedia.cursecdn.com/zelda_gamepedia_en/b/bc/ALttP_Bow_%26_Arrows_Sprite.png?version=5f85a70e6366bf473544ef93b274f74c", - "Silver Bow": "https://oyster.ignimgs.com/mediawiki/apis.ign.com/the-legend-of-zelda-a-link-to-the-past/6/65/Bow.png?width=1920", - "Green Mail": "https://oyster.ignimgs.com/mediawiki/apis.ign.com/the-legend-of-zelda-a-link-to-the-past/c/c9/SGreenTunic.png?width=1920", - "Blue Mail": "https://oyster.ignimgs.com/mediawiki/apis.ign.com/the-legend-of-zelda-a-link-to-the-past/9/98/SBlueTunic.png?width=1920", - "Red Mail": "https://oyster.ignimgs.com/mediawiki/apis.ign.com/the-legend-of-zelda-a-link-to-the-past/7/74/SRedTunic.png?width=1920", - "Power Glove": "https://oyster.ignimgs.com/mediawiki/apis.ign.com/the-legend-of-zelda-a-link-to-the-past/f/f5/SPowerGlove.png?width=1920", - "Titan Mitts": "https://oyster.ignimgs.com/mediawiki/apis.ign.com/the-legend-of-zelda-a-link-to-the-past/c/c1/STitanMitt.png?width=1920", - "Progressive Sword": "https://gamepedia.cursecdn.com/zelda_gamepedia_en/c/cc/ALttP_Master_Sword_Sprite.png?version=55869db2a20e157cd3b5c8f556097725", - "Pegasus Boots": "https://gamepedia.cursecdn.com/zelda_gamepedia_en/e/ed/ALttP_Pegasus_Shoes_Sprite.png?version=405f42f97240c9dcd2b71ffc4bebc7f9", - "Progressive Glove": "https://oyster.ignimgs.com/mediawiki/apis.ign.com/the-legend-of-zelda-a-link-to-the-past/c/c1/STitanMitt.png?width=1920", - "Flippers": "https://oyster.ignimgs.com/mediawiki/apis.ign.com/the-legend-of-zelda-a-link-to-the-past/4/4c/ZoraFlippers.png?width=1920", - "Moon Pearl": "https://gamepedia.cursecdn.com/zelda_gamepedia_en/6/63/ALttP_Moon_Pearl_Sprite.png?version=d601542d5abcc3e006ee163254bea77e", - "Progressive Bow": "https://gamepedia.cursecdn.com/zelda_gamepedia_en/b/bc/ALttP_Bow_%26_Arrows_Sprite.png?version=cfb7648b3714cccc80e2b17b2adf00ed", - "Blue Boomerang": "https://gamepedia.cursecdn.com/zelda_gamepedia_en/c/c3/ALttP_Boomerang_Sprite.png?version=96127d163759395eb510b81a556d500e", - "Red Boomerang": "https://gamepedia.cursecdn.com/zelda_gamepedia_en/b/b9/ALttP_Magical_Boomerang_Sprite.png?version=47cddce7a07bc3e4c2c10727b491f400", - "Hookshot": "https://gamepedia.cursecdn.com/zelda_gamepedia_en/2/24/Hookshot.png?version=c90bc8e07a52e8090377bd6ef854c18b", - "Mushroom": "https://gamepedia.cursecdn.com/zelda_gamepedia_en/3/35/ALttP_Mushroom_Sprite.png?version=1f1acb30d71bd96b60a3491e54bbfe59", - "Magic Powder": "https://gamepedia.cursecdn.com/zelda_gamepedia_en/e/e5/ALttP_Magic_Powder_Sprite.png?version=c24e38effbd4f80496d35830ce8ff4ec", - "Fire Rod": "https://gamepedia.cursecdn.com/zelda_gamepedia_en/d/d6/FireRod.png?version=6eabc9f24d25697e2c4cd43ddc8207c0", - "Ice Rod": "https://gamepedia.cursecdn.com/zelda_gamepedia_en/d/d7/ALttP_Ice_Rod_Sprite.png?version=1f944148223d91cfc6a615c92286c3bc", - "Bombos": "https://gamepedia.cursecdn.com/zelda_gamepedia_en/8/8c/ALttP_Bombos_Medallion_Sprite.png?version=f4d6aba47fb69375e090178f0fc33b26", - "Ether": "https://gamepedia.cursecdn.com/zelda_gamepedia_en/3/3c/Ether.png?version=34027651a5565fcc5a83189178ab17b5", - "Quake": "https://gamepedia.cursecdn.com/zelda_gamepedia_en/5/56/ALttP_Quake_Medallion_Sprite.png?version=efd64d451b1831bd59f7b7d6b61b5879", - "Lamp": "https://gamepedia.cursecdn.com/zelda_gamepedia_en/6/63/ALttP_Lantern_Sprite.png?version=e76eaa1ec509c9a5efb2916698d5a4ce", - "Hammer": "https://gamepedia.cursecdn.com/zelda_gamepedia_en/d/d1/ALttP_Hammer_Sprite.png?version=e0adec227193818dcaedf587eba34500", - "Shovel": "https://gamepedia.cursecdn.com/zelda_gamepedia_en/c/c4/ALttP_Shovel_Sprite.png?version=e73d1ce0115c2c70eaca15b014bd6f05", - "Flute": "https://gamepedia.cursecdn.com/zelda_gamepedia_en/d/db/Flute.png?version=ec4982b31c56da2c0c010905c5c60390", - "Bug Catching Net": "https://gamepedia.cursecdn.com/zelda_gamepedia_en/5/54/Bug-CatchingNet.png?version=4d40e0ee015b687ff75b333b968d8be6", - "Book of Mudora": "https://gamepedia.cursecdn.com/zelda_gamepedia_en/2/22/ALttP_Book_of_Mudora_Sprite.png?version=11e4632bba54f6b9bf921df06ac93744", - "Bottle": "https://gamepedia.cursecdn.com/zelda_gamepedia_en/e/ef/ALttP_Magic_Bottle_Sprite.png?version=fd98ab04db775270cbe79fce0235777b", - "Cane of Somaria": "https://gamepedia.cursecdn.com/zelda_gamepedia_en/e/e1/ALttP_Cane_of_Somaria_Sprite.png?version=8cc1900dfd887890badffc903bb87943", - "Cane of Byrna": "https://gamepedia.cursecdn.com/zelda_gamepedia_en/b/bc/ALttP_Cane_of_Byrna_Sprite.png?version=758b607c8cbe2cf1900d42a0b3d0fb54", - "Cape": "https://gamepedia.cursecdn.com/zelda_gamepedia_en/1/1c/ALttP_Magic_Cape_Sprite.png?version=6b77f0d609aab0c751307fc124736832", - "Magic Mirror": "https://gamepedia.cursecdn.com/zelda_gamepedia_en/e/e5/ALttP_Magic_Mirror_Sprite.png?version=e035dbc9cbe2a3bd44aa6d047762b0cc", - "Triforce": "https://gamepedia.cursecdn.com/zelda_gamepedia_en/4/4e/TriforceALttPTitle.png?version=dc398e1293177581c16303e4f9d12a48", +{% set icons = { + "Blue Shield": "https://www.zeldadungeon.net/wiki/images/thumb/c/c3/FightersShield-ALttP-Sprite.png/100px-FightersShield-ALttP-Sprite.png", + "Red Shield": "https://www.zeldadungeon.net/wiki/images/thumb/9/9e/FireShield-ALttP-Sprite.png/111px-FireShield-ALttP-Sprite.png", + "Mirror Shield": "https://www.zeldadungeon.net/wiki/images/thumb/e/e3/MirrorShield-ALttP-Sprite.png/105px-MirrorShield-ALttP-Sprite.png", + "Fighter Sword": "https://upload.wikimedia.org/wikibooks/en/8/8e/Zelda_ALttP_item_L-1_Sword.png", + "Master Sword": "https://upload.wikimedia.org/wikibooks/en/8/87/BS_Zelda_AST_item_L-2_Sword.png", + "Tempered Sword": "https://upload.wikimedia.org/wikibooks/en/c/cc/BS_Zelda_AST_item_L-3_Sword.png", + "Golden Sword": "https://upload.wikimedia.org/wikibooks/en/4/40/BS_Zelda_AST_item_L-4_Sword.png", + "Bow": "https://www.zeldadungeon.net/wiki/images/thumb/8/8c/BowArrows-ALttP-Sprite.png/120px-BowArrows-ALttP-Sprite.png", + "Silver Bow": "https://upload.wikimedia.org/wikibooks/en/6/69/Zelda_ALttP_item_Silver_Arrows.png", + "Green Mail": "https://upload.wikimedia.org/wikibooks/en/d/dd/Zelda_ALttP_item_Green_Mail.png", + "Blue Mail": "https://upload.wikimedia.org/wikibooks/en/b/b5/Zelda_ALttP_item_Blue_Mail.png", + "Red Mail": "https://upload.wikimedia.org/wikibooks/en/d/db/Zelda_ALttP_item_Red_Mail.png", + "Power Glove": "https://www.zeldadungeon.net/wiki/images/thumb/4/41/PowerGlove-ALttP-Sprite.png/105px-PowerGlove-ALttP-Sprite.png", + "Titan Mitts": "https://www.zeldadungeon.net/wiki/images/thumb/7/75/TitanMitt-ALttP-Sprite.png/105px-TitanMitt-ALttP-Sprite.png", + "Pegasus Boots": "https://gamepedia.cursecdn.com/zelda_gamepedia_en/e/ed/ALttP_Pegasus_Shoes_Sprite.png", + "Flippers": "https://www.zeldadungeon.net/wiki/images/thumb/b/bc/ZoraFlippers-ALttP-Sprite.png/112px-ZoraFlippers-ALttP-Sprite.png", + "Moon Pearl": "https://gamepedia.cursecdn.com/zelda_gamepedia_en/6/63/ALttP_Moon_Pearl_Sprite.png", + "Blue Boomerang": "https://www.zeldadungeon.net/wiki/images/thumb/f/f0/Boomerang-ALttP-Sprite.png/86px-Boomerang-ALttP-Sprite.png", + "Red Boomerang": "https://www.zeldadungeon.net/wiki/images/thumb/3/3c/MagicalBoomerang-ALttP-Sprite.png/86px-MagicalBoomerang-ALttP-Sprite.png", + "Hookshot": "https://gamepedia.cursecdn.com/zelda_gamepedia_en/2/24/Hookshot.png", + "Mushroom": "https://gamepedia.cursecdn.com/zelda_gamepedia_en/3/35/ALttP_Mushroom_Sprite.png", + "Magic Powder": "https://gamepedia.cursecdn.com/zelda_gamepedia_en/e/e5/ALttP_Magic_Powder_Sprite.png", + "Fire Rod": "https://gamepedia.cursecdn.com/zelda_gamepedia_en/d/d6/FireRod.png", + "Ice Rod": "https://gamepedia.cursecdn.com/zelda_gamepedia_en/d/d7/ALttP_Ice_Rod_Sprite.png", + "Bombos": "https://gamepedia.cursecdn.com/zelda_gamepedia_en/8/8c/ALttP_Bombos_Medallion_Sprite.png", + "Ether": "https://gamepedia.cursecdn.com/zelda_gamepedia_en/3/3c/Ether.png", + "Quake": "https://gamepedia.cursecdn.com/zelda_gamepedia_en/5/56/ALttP_Quake_Medallion_Sprite.png", + "Lamp": "https://gamepedia.cursecdn.com/zelda_gamepedia_en/6/63/ALttP_Lantern_Sprite.png", + "Hammer": "https://gamepedia.cursecdn.com/zelda_gamepedia_en/d/d1/ALttP_Hammer_Sprite.png", + "Shovel": "https://gamepedia.cursecdn.com/zelda_gamepedia_en/c/c4/ALttP_Shovel_Sprite.png", + "Flute": "https://gamepedia.cursecdn.com/zelda_gamepedia_en/d/db/Flute.png", + "Bug Catching Net": "https://gamepedia.cursecdn.com/zelda_gamepedia_en/5/54/Bug-CatchingNet.png", + "Book of Mudora": "https://gamepedia.cursecdn.com/zelda_gamepedia_en/2/22/ALttP_Book_of_Mudora_Sprite.png", + "Bottles": "https://gamepedia.cursecdn.com/zelda_gamepedia_en/e/ef/ALttP_Magic_Bottle_Sprite.png", + "Cane of Somaria": "https://gamepedia.cursecdn.com/zelda_gamepedia_en/e/e1/ALttP_Cane_of_Somaria_Sprite.png", + "Cane of Byrna": "https://gamepedia.cursecdn.com/zelda_gamepedia_en/b/bc/ALttP_Cane_of_Byrna_Sprite.png", + "Cape": "https://gamepedia.cursecdn.com/zelda_gamepedia_en/1/1c/ALttP_Magic_Cape_Sprite.png", + "Magic Mirror": "https://gamepedia.cursecdn.com/zelda_gamepedia_en/e/e5/ALttP_Magic_Mirror_Sprite.png", + "Triforce": "https://gamepedia.cursecdn.com/zelda_gamepedia_en/4/4e/TriforceALttPTitle.png", "Triforce Piece": "https://www.zeldadungeon.net/wiki/images/thumb/5/54/Triforce_Fragment_-_BS_Zelda.png/62px-Triforce_Fragment_-_BS_Zelda.png", - "Small Key": "https://gamepedia.cursecdn.com/zelda_gamepedia_en/f/f1/ALttP_Small_Key_Sprite.png?version=4f35d92842f0de39d969181eea03774e", - "Big Key": "https://gamepedia.cursecdn.com/zelda_gamepedia_en/3/33/ALttP_Big_Key_Sprite.png?version=136dfa418ba76c8b4e270f466fc12f4d", - "Chest": "https://gamepedia.cursecdn.com/zelda_gamepedia_en/7/73/ALttP_Treasure_Chest_Sprite.png?version=5f530ecd98dcb22251e146e8049c0dda", - "Light World": "https://gamepedia.cursecdn.com/zelda_gamepedia_en/e/e7/ALttP_Soldier_Green_Sprite.png?version=d650d417934cd707a47e496489c268a6", - "Dark World": "https://gamepedia.cursecdn.com/zelda_gamepedia_en/9/94/ALttP_Moblin_Sprite.png?version=ebf50e33f4657c377d1606bcc0886ddc", - "Hyrule Castle": "https://gamepedia.cursecdn.com/zelda_gamepedia_en/d/d3/ALttP_Ball_and_Chain_Trooper_Sprite.png?version=1768a87c06d29cc8e7ddd80b9fa516be", - "Agahnims Tower": "https://gamepedia.cursecdn.com/zelda_gamepedia_en/1/1e/ALttP_Agahnim_Sprite.png?version=365956e61b0c2191eae4eddbe591dab5", - "Desert Palace": "https://www.zeldadungeon.net/wiki/images/2/25/Lanmola-ALTTP-Sprite.png", - "Eastern Palace": "https://www.zeldadungeon.net/wiki/images/d/dc/RedArmosKnight.png", - "Tower of Hera": "https://gamepedia.cursecdn.com/zelda_gamepedia_en/3/3c/ALttP_Moldorm_Sprite.png?version=c588257bdc2543468e008a6b30f262a7", - "Palace of Darkness": "https://gamepedia.cursecdn.com/zelda_gamepedia_en/e/ed/ALttP_Helmasaur_King_Sprite.png?version=ab8a4a1cfd91d4fc43466c56cba30022", - "Swamp Palace": "https://gamepedia.cursecdn.com/zelda_gamepedia_en/7/73/ALttP_Arrghus_Sprite.png?version=b098be3122e53f751b74f4a5ef9184b5", - "Skull Woods": "https://alttp-wiki.net/images/6/6a/Mothula.png", - "Thieves Town": "https://gamepedia.cursecdn.com/zelda_gamepedia_en/8/86/ALttP_Blind_the_Thief_Sprite.png?version=3833021bfcd112be54e7390679047222", - "Ice Palace": "https://gamepedia.cursecdn.com/zelda_gamepedia_en/3/33/ALttP_Kholdstare_Sprite.png?version=e5a1b0e8b2298e550d85f90bf97045c0", - "Misery Mire": "https://gamepedia.cursecdn.com/zelda_gamepedia_en/8/85/ALttP_Vitreous_Sprite.png?version=92b2e9cb0aa63f831760f08041d8d8d8", - "Turtle Rock": "https://gamepedia.cursecdn.com/zelda_gamepedia_en/9/91/ALttP_Trinexx_Sprite.png?version=0cc867d513952aa03edd155597a0c0be", - "Ganons Tower": "https://gamepedia.cursecdn.com/zelda_gamepedia_en/b/b9/ALttP_Ganon_Sprite.png?version=956f51f054954dfff53c1a9d4f929c74", -} -%} + "Bombs": "https://static.wikia.nocookie.net/zelda_gamepedia_en/images/3/38/ALttP_Bomb_Sprite.png", + "Small Key": "https://gamepedia.cursecdn.com/zelda_gamepedia_en/f/f1/ALttP_Small_Key_Sprite.png", + "Big Key": "https://gamepedia.cursecdn.com/zelda_gamepedia_en/3/33/ALttP_Big_Key_Sprite.png", +} %} - +{% set inventory_order = [ + "Progressive Bow", "Boomerangs", "Hookshot", "Bombs", "Mushroom", "Magic Powder", + "Fire Rod", "Ice Rod", "Bombos", "Ether", "Quake", "Progressive Mail", + "Lamp", "Hammer", "Flute", "Bug Catching Net", "Book of Mudora", "Progressive Shield", + "Bottles", "Cane of Somaria", "Cane of Byrna", "Cape", "Magic Mirror", "Progressive Sword", + "Shovel", "Pegasus Boots", "Progressive Glove", "Flippers", "Moon Pearl", "Triforce Piece", +] %} + +{# Most have a duplicated 0th entry for when we have none of that item to still load the correct icon/name. #} +{% set progressive_order = { + "Progressive Bow": ["Bow", "Bow", "Silver Bow"], + "Progressive Mail": ["Green Mail", "Blue Mail", "Red Mail"], + "Progressive Shield": ["Blue Shield", "Blue Shield", "Red Shield", "Mirror Shield"], + "Progressive Sword": ["Fighter Sword", "Fighter Sword", "Master Sword", "Tempered Sword", "Golden Sword"], + "Progressive Glove": ["Power Glove", "Power Glove", "Titan Mitts"], +} %} + +{% set dungeon_keys = { + "Hyrule Castle": ("Small Key (Hyrule Castle)", "Big Key (Hyrule Castle)"), + "Agahnims Tower": ("Small Key (Agahnims Tower)", "Big Key (Agahnims Tower)"), + "Eastern Palace": ("Small Key (Eastern Palace)", "Big Key (Eastern Palace)"), + "Desert Palace": ("Small Key (Desert Palace)", "Big Key (Desert Palace)"), + "Tower of Hera": ("Small Key (Tower of Hera)", "Big Key (Tower of Hera)"), + "Palace of Darkness": ("Small Key (Palace of Darkness)", "Big Key (Palace of Darkness)"), + "Thieves' Town": ("Small Key (Thieves Town)", "Big Key (Thieves Town)"), + "Skull Woods": ("Small Key (Skull Woods)", "Big Key (Skull Woods)"), + "Swamp Palace": ("Small Key (Swamp Palace)", "Big Key (Swamp Palace)"), + "Ice Palace": ("Small Key (Ice Palace)", "Big Key (Ice Palace)"), + "Misery Mire": ("Small Key (Misery Mire)", "Big Key (Misery Mire)"), + "Turtle Rock": ("Small Key (Turtle Rock)", "Big Key (Turtle Rock)"), + "Ganons Tower": ("Small Key (Ganons Tower)", "Big Key (Ganons Tower)"), +} %} + + + + {{ player_name }}'s Tracker - - + @@ -76,79 +92,127 @@ Switch To Generic Tracker -
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
- - - - - {% if key_locations and "Universal" not in key_locations %} - +
+ {# Inventory Grid #} +
+ {% for item in inventory_order %} + {% if item in progressive_order %} + {% set non_prog_item = progressive_order[item][inventory[item]] %} +
+ {{ non_prog_item }} +
+ {% elif item == "Boomerangs" %} +
+ Blue Boomerang + Red Boomerang +
+ {% else %} +
+ {{ item }} + {% if item == "Bottles" or item == "Triforce Piece" %} +
{{ inventory[item] }}
+ {% endif %} +
{% endif %} - {% if big_key_locations %} -
+ {% endfor %} + + +
+
+
+
+
SK
+
BK
+
+ + {% for region_name, region_data in regions.items() %} + {% if region_data["locations"] | length > 0 %} +
+ + {% if region_name in dungeon_keys %} +
+ {{ region_name }} + {{ region_data["checked"] }} / {{ region_data["locations"] | length }} + {{ inventory[dungeon_keys[region_name][0]] }} + + {% if region_name == "Agahnims Tower" %} + — + {% elif inventory[dungeon_keys[region_name][1]] %} + ✔ + {% endif %} + +
+ {% else %} +
+ {{ region_name }} + {{ region_data["checked"] }} / {{ region_data["locations"] | length }} + + +
+ {% endif %} +
+ +
+ {% for location, checked in region_data["locations"] %} +
{{ location }}
+
{% if checked %}✔{% endif %}
+ {% endfor %} +
+
{% endif %} -
- {% for area in sp_areas %} - - - - {% if key_locations and "Universal" not in key_locations %} - - {% endif %} - {% if big_key_locations %} - - {% endif %} - {% endfor %} -
{{ area }}{{ checks_done[area] }} / {{ checks_in_area[area] }} - {{ inventory[small_key_ids[area]] if area in key_locations else '—' }} - - {{ '✔' if area in big_key_locations and inventory[big_key_ids[area]] else ('—' if area not in big_key_locations else '') }} -
+
+ + diff --git a/WebHostLib/tracker.py b/WebHostLib/tracker.py index 0b74c6067624..0ae7b2a5162c 100644 --- a/WebHostLib/tracker.py +++ b/WebHostLib/tracker.py @@ -695,196 +695,169 @@ def _get_location_table(checks_table: dict) -> dict: ) def render_ALinkToThePast_tracker(tracker_data: TrackerData, team: int, player: int) -> str: - # Helper objects. - alttp_id_lookup = tracker_data.item_name_to_id["A Link to the Past"] + inventory = collections.Counter({ + tracker_data.item_id_to_name["A Link to the Past"][code]: count + for code, count in tracker_data.get_player_inventory_counts(team, player).items() + }) - links = { - "Bow": "Progressive Bow", - "Silver Arrows": "Progressive Bow", - "Silver Bow": "Progressive Bow", - "Progressive Bow (Alt)": "Progressive Bow", - "Bottle (Red Potion)": "Bottle", - "Bottle (Green Potion)": "Bottle", - "Bottle (Blue Potion)": "Bottle", - "Bottle (Fairy)": "Bottle", - "Bottle (Bee)": "Bottle", - "Bottle (Good Bee)": "Bottle", - "Fighter Sword": "Progressive Sword", - "Master Sword": "Progressive Sword", - "Tempered Sword": "Progressive Sword", - "Golden Sword": "Progressive Sword", - "Power Glove": "Progressive Glove", - "Titans Mitts": "Progressive Glove", + # Mapping from non-progressive item to progressive name and max level. + non_progressive_items = { + "Fighter Sword": ("Progressive Sword", 1), + "Master Sword": ("Progressive Sword", 2), + "Tempered Sword": ("Progressive Sword", 3), + "Golden Sword": ("Progressive Sword", 4), + "Power Glove": ("Progressive Glove", 1), + "Titans Mitts": ("Progressive Glove", 2), + "Bow": ("Progressive Bow", 1), + "Silver Bow": ("Progressive Bow", 2), + "Blue Mail": ("Progressive Mail", 1), + "Red Mail": ("Progressive Mail", 2), + "Blue Shield": ("Progressive Shield", 1), + "Red Shield": ("Progressive Shield", 2), + "Mirror Shield": ("Progressive Shield", 3), } - links = {alttp_id_lookup[key]: alttp_id_lookup[value] for key, value in links.items()} - levels = { - "Fighter Sword": 1, - "Master Sword": 2, - "Tempered Sword": 3, - "Golden Sword": 4, - "Power Glove": 1, - "Titans Mitts": 2, - "Bow": 1, - "Silver Bow": 2, - "Triforce Piece": 90, + + progressive_item_max = { + "Progressive Sword": 4, + "Progressive Glove": 2, + "Progressive Bow": 2, + "Progressive Mail": 2, + "Progressive Shield": 3, } - tracking_names = [ - "Progressive Sword", "Progressive Bow", "Book of Mudora", "Hammer", "Hookshot", "Magic Mirror", "Flute", - "Pegasus Boots", "Progressive Glove", "Flippers", "Moon Pearl", "Blue Boomerang", "Red Boomerang", - "Bug Catching Net", "Cape", "Shovel", "Lamp", "Mushroom", "Magic Powder", "Cane of Somaria", - "Cane of Byrna", "Fire Rod", "Ice Rod", "Bombos", "Ether", "Quake", "Bottle", "Triforce Piece", "Triforce", + + bottle_items = [ + "Bottle", + "Bottle (Bee)", + "Bottle (Blue Potion)", + "Bottle (Fairy)", + "Bottle (Good Bee)", + "Bottle (Green Potion)", + "Bottle (Red Potion)", ] - default_locations = { + + # Translate non-progression items to progression items for tracker simplicity. + for item, (prog_item, level) in non_progressive_items.items(): + if item in inventory: + inventory[prog_item] = min(max(inventory[prog_item], level), progressive_item_max[prog_item]) + + for bottle in bottle_items: + inventory["Bottles"] = min(inventory["Bottles"] + inventory[bottle], 4) + + if "Progressive Bow (Alt)" in inventory: + inventory["Progressive Bow"] += inventory["Progressive Bow (Alt)"] + inventory["Progressive Bow"] = min(inventory["Progressive Bow"], progressive_item_max["Progressive Bow"]) + + # Highlight 'bombs' if we received any bomb upgrades in bombless start. + # In race mode, we'll just assume bombless start for simplicity. + if tracker_data.get_slot_data(team, player).get("bombless_start", True): + inventory["Bombs"] = sum(count for item, count in inventory.items() if item.startswith("Bomb Upgrade")) + else: + inventory["Bombs"] = 1 + + known_regions = { "Light World": { - 1572864, 1572865, 60034, 1572867, 1572868, 60037, 1572869, 1572866, 60040, 59788, 60046, 60175, - 1572880, 60049, 60178, 1572883, 60052, 60181, 1572885, 60055, 60184, 191256, 60058, 60187, 1572884, - 1572886, 1572887, 1572906, 60202, 60205, 59824, 166320, 1010170, 60208, 60211, 60214, 60217, 59836, - 60220, 60223, 59839, 1573184, 60226, 975299, 1573188, 1573189, 188229, 60229, 60232, 1573193, - 1573194, 60235, 1573187, 59845, 59854, 211407, 60238, 59857, 1573185, 1573186, 1572882, 212328, - 59881, 59761, 59890, 59770, 193020, 212605 + 0x180013, 0x02eb18, 0x18014a, 0x180145, 0x033d68, 0x00eb0f, 0x00eb12, 0x00eb15, 0x00eb18, 0x00eb1b, + 0x02df45, 0x00e971, 0x0ee1c3, 0x180149, 0x00e9b0, 0x00e9d1, 0x00e97a, 0x00e98c, 0x00e9bc, 0x00e9ce, + 0x00e9e9, 0x00e9f2, 0x00ea82, 0x00ea85, 0x00ea88, 0x02f1fc, 0x00ea8e, 0x00ea91, 0x00ea94, 0x00ea97, + 0x00ea9a, 0x18002a, 0x180015, 0x0339cf, 0x033e7d, 0x180000, 0x180001, 0x180003, 0x180004, 0x180005, + 0x00eb42, 0x00eb45, 0x00eb48, 0x00eb4b, 0x180010, 0x00eb4e, 0x00eb3f, 0x180012, 0x180014, 0x180144, + 0x180142, 0x180143, 0x0289b0, 0x0f69fa, 0x180002, 0x00eb2a, 0x00eb2d, 0x00eb30, 0x00eb33, 0x00eb36, + 0x00eb39, 0x00eb3c, 0x00e9bf, 0x180016, 0x180017, 0x180140, 0x180141, 0x00e9c5, 0x400018, 0x400019, + 0x40001a, 0x400015, 0x400016, 0x400017, 0x400012, 0x400013, 0x400014, 0x40001b, 0x40001c, 0x40001d, + 0x400022, 0x400023, 0x400024, 0x400025, 0x400021, 0x40001e, 0x40001f, }, "Dark World": { - 59776, 59779, 975237, 1572870, 60043, 1572881, 60190, 60193, 60196, 60199, 60840, 1573190, 209095, - 1573192, 1573191, 60241, 60244, 60247, 60250, 59884, 59887, 60019, 60022, 60028, 60031 + 0x180147, 0x0ee185, 0x0330c7, 0x180148, 0x00eb1e, 0x00eb21, 0x00eb24, 0x00eb27, 0x180011, 0x180006, + 0x00e980, 0x00e983, 0x00e9ec, 0x00e9ef, 0x00eda8, 0x180146, 0x00ea73, 0x00ea76, 0x00ea7c, 0x00ea7f, + 0x00ea8b, 0x00eb51, 0x00eb54, 0x00eb5a, 0x00eb57, 0x400000, 0x400001, 0x400002, 0x400006, 0x400007, + 0x400008, 0x400009, 0x40000a, 0x40000b, 0x40000f, 0x400010, 0x400011, 0x400003, 0x400004, 0x400005, + 0x40000c, 0x40000d, 0x40000e, + }, + "Hyrule Castle": { + 0x00e974, 0x00eb0c, 0x00eb09, 0x00e96e, 0x00eb5d, 0x00eb60, 0x00eb63, 0x00ea79, 0x140037, 0x140034, + 0x14000d, 0x14003d, + }, + "Agahnims Tower": { + 0x00eab5, 0x00eab2, 0x140061, 0x140052, + }, + "Eastern Palace": { + 0x00e977, 0x00e97d, 0x00e9b3, 0x00e9b9, 0x00e9f5, 0x180150, 0x14005b, 0x140049, + }, + "Desert Palace": { + 0x00e98f, 0x180160, 0x00e9b6, 0x00e9cb, 0x00e9c2, 0x180151, 0x140031, 0x14002b, 0x140028, + }, + "Tower of Hera": { + 0x180162, 0x00e9ad, 0x00e9e6, 0x00e9fb, 0x00e9f8, 0x180152 }, - "Desert Palace": {1573216, 59842, 59851, 59791, 1573201, 59830}, - "Eastern Palace": {1573200, 59827, 59893, 59767, 59833, 59773}, - "Hyrule Castle": {60256, 60259, 60169, 60172, 59758, 59764, 60025, 60253}, - "Agahnims Tower": {60082, 60085}, - "Tower of Hera": {1573218, 59878, 59821, 1573202, 59896, 59899}, - "Swamp Palace": {60064, 60067, 60070, 59782, 59785, 60073, 60076, 60079, 1573204, 60061}, - "Thieves Town": {59905, 59908, 59911, 59914, 59917, 59920, 59923, 1573206}, - "Skull Woods": {59809, 59902, 59848, 59794, 1573205, 59800, 59803, 59806}, - "Ice Palace": {59872, 59875, 59812, 59818, 59860, 59797, 1573207, 59869}, - "Misery Mire": {60001, 60004, 60007, 60010, 60013, 1573208, 59866, 59998}, - "Turtle Rock": {59938, 59941, 59944, 1573209, 59947, 59950, 59953, 59956, 59926, 59929, 59932, 59935}, "Palace of Darkness": { - 59968, 59971, 59974, 59977, 59980, 59983, 59986, 1573203, 59989, 59959, 59992, 59962, 59995, - 59965 + 0x00ea5b, 0x00ea3d, 0x00ea49, 0x00ea37, 0x00ea3a, 0x00ea52, 0x00ea43, 0x00ea4c, 0x00ea4f, 0x00ea55, + 0x00ea58, 0x00ea40, 0x00ea46, 0x180153, + }, + "Swamp Palace": { + 0x00ea9d, 0x00e986, 0x00e989, 0x00eaa0, 0x00eaa6, 0x00eaa3, 0x00eaa9, 0x00eaac, 0x00eaaf, 0x180154, + 0x140019, 0x140016, 0x140013, 0x140010, 0x14000a, + }, + "Thieves' Town": { + 0x00ea04, 0x00ea01, 0x00ea07, 0x00ea0a, 0x00ea0d, 0x00ea10, 0x00ea13, 0x180156, 0x14005e, 0x14004f, + }, + "Skull Woods": { + 0x00e992, 0x00e99b, 0x00e998, 0x00e9a1, 0x00e9c8, 0x00e99e, 0x00e9fe, 0x180155, 0x14002e, 0x14001c, + }, + "Ice Palace": { + 0x00e9d4, 0x00e995, 0x00e9aa, 0x00e9e3, 0x00e9e0, 0x00e9a4, 0x00e9dd, 0x180157, 0x140004, 0x140022, + 0x140025, 0x140046, + }, + "Misery Mire": { + 0x00ea67, 0x00ea6a, 0x00ea5e, 0x00ea61, 0x00e9da, 0x00ea64, 0x00ea6d, 0x180158, 0x140055, 0x14004c, + 0x140064, + }, + "Turtle Rock": { + 0x00ea22, 0x00ea1c, 0x00ea1f, 0x00ea16, 0x00ea25, 0x00ea19, 0x00ea34, 0x00ea31, 0x00ea2e, 0x00ea2b, + 0x00ea28, 0x180159, 0x140058, 0x140007, }, "Ganons Tower": { - 60160, 60163, 60166, 60088, 60091, 60094, 60097, 60100, 60103, 60106, 60109, 60112, 60115, 60118, - 60121, 60124, 60127, 1573217, 60130, 60133, 60136, 60139, 60142, 60145, 60148, 60151, 60157 + 0x180161, 0x00ead9, 0x00eadc, 0x00eae2, 0x00eae5, 0x00eae8, 0x00eaeb, 0x00eaee, 0x00eab8, 0x00eabb, + 0x00eabe, 0x00eac1, 0x00ead3, 0x00ead0, 0x00eac4, 0x00eac7, 0x00eaca, 0x00eacd, 0x00eadf, 0x00eadf, + 0x00ead6, 0x00eaf4, 0x00eaf7, 0x00eaf1, 0x00eafd, 0x00eb00, 0x00eb03, 0x00eb06, 0x140040, 0x140043, + 0x14003a, 0x14001f, }, - "Total": set() } - key_only_locations = { - "Light World": set(), - "Dark World": set(), - "Desert Palace": {0x140031, 0x14002b, 0x140061, 0x140028}, - "Eastern Palace": {0x14005b, 0x140049}, - "Hyrule Castle": {0x140037, 0x140034, 0x14000d, 0x14003d}, - "Agahnims Tower": {0x140061, 0x140052}, - "Tower of Hera": set(), - "Swamp Palace": {0x140019, 0x140016, 0x140013, 0x140010, 0x14000a}, - "Thieves Town": {0x14005e, 0x14004f}, - "Skull Woods": {0x14002e, 0x14001c}, - "Ice Palace": {0x140004, 0x140022, 0x140025, 0x140046}, - "Misery Mire": {0x140055, 0x14004c, 0x140064}, - "Turtle Rock": {0x140058, 0x140007}, - "Palace of Darkness": set(), - "Ganons Tower": {0x140040, 0x140043, 0x14003a, 0x14001f}, - "Total": set() - } - location_to_area = {} - for area, locations in default_locations.items(): - for checked_location in locations: - location_to_area[checked_location] = area - for area, locations in key_only_locations.items(): - for checked_location in locations: - location_to_area[checked_location] = area - - checks_in_area = {area: len(checks) for area, checks in default_locations.items()} - checks_in_area["Total"] = 216 - ordered_areas = ( - "Light World", "Dark World", "Hyrule Castle", "Agahnims Tower", "Eastern Palace", "Desert Palace", - "Tower of Hera", "Palace of Darkness", "Swamp Palace", "Skull Woods", "Thieves Town", "Ice Palace", - "Misery Mire", "Turtle Rock", "Ganons Tower", "Total" - ) - tracking_ids = [] - for item in tracking_names: - tracking_ids.append(alttp_id_lookup[item]) - - # Can't wait to get this into the apworld. Oof. - from worlds.alttp import Items - - small_key_ids = {} - big_key_ids = {} - ids_small_key = {} - ids_big_key = {} - for item_name, data in Items.item_table.items(): - if "Key" in item_name: - area = item_name.split("(")[1][:-1] - if "Small" in item_name: - small_key_ids[area] = data[2] - ids_small_key[data[2]] = area - else: - big_key_ids[area] = data[2] - ids_big_key[data[2]] = area - - inventory = collections.Counter() - checks_done = {loc_name: 0 for loc_name in default_locations} - player_big_key_locations = set() - player_small_key_locations = set() - - player_locations = tracker_data.get_player_locations(team, player) - for checked_location in tracker_data.get_player_checked_locations(team, player): - if checked_location in player_locations: - area_name = location_to_area.get(checked_location, None) - if area_name: - checks_done[area_name] += 1 - - checks_done["Total"] += 1 - - for received_item in tracker_data.get_player_received_items(team, player): - target_item = links.get(received_item.item, received_item.item) - if received_item.item in levels: # non-progressive - inventory[target_item] = max(inventory[target_item], levels[received_item.item]) - else: - inventory[target_item] += 1 - - for location, (item_id, _, _) in player_locations.items(): - if item_id in ids_big_key: - player_big_key_locations.add(ids_big_key[item_id]) - elif item_id in ids_small_key: - player_small_key_locations.add(ids_small_key[item_id]) - - # Note the presence of the triforce item - if tracker_data.get_player_client_status(team, player) == ClientStatus.CLIENT_GOAL: - inventory[106] = 1 # Triforce - - # Progressive items need special handling for icons and class - progressive_items = { - "Progressive Sword": 94, - "Progressive Glove": 97, - "Progressive Bow": 100, - "Progressive Mail": 96, - "Progressive Shield": 95, - } - progressive_names = { - "Progressive Sword": [None, "Fighter Sword", "Master Sword", "Tempered Sword", "Golden Sword"], - "Progressive Glove": [None, "Power Glove", "Titan Mitts"], - "Progressive Bow": [None, "Bow", "Silver Bow"], - "Progressive Mail": ["Green Mail", "Blue Mail", "Red Mail"], - "Progressive Shield": [None, "Blue Shield", "Red Shield", "Mirror Shield"] + regions = { + "Light World": {"checked": 0, "locations": []}, + "Dark World": {"checked": 0, "locations": []}, + "Hyrule Castle": {"checked": 0, "locations": []}, + "Agahnims Tower": {"checked": 0, "locations": []}, + "Eastern Palace": {"checked": 0, "locations": []}, + "Desert Palace": {"checked": 0, "locations": []}, + "Tower of Hera": {"checked": 0, "locations": []}, + "Palace of Darkness": {"checked": 0, "locations": []}, + "Skull Woods": {"checked": 0, "locations": []}, + "Thieves' Town": {"checked": 0, "locations": []}, + "Swamp Palace": {"checked": 0, "locations": []}, + "Ice Palace": {"checked": 0, "locations": []}, + "Misery Mire": {"checked": 0, "locations": []}, + "Turtle Rock": {"checked": 0, "locations": []}, + "Ganons Tower": {"checked": 0, "locations": []}, + "Unknown": {"checked": 0, "locations": []}, } - # Determine which icon to use - display_data = {} - for item_name, item_id in progressive_items.items(): - level = min(inventory[item_id], len(progressive_names[item_name]) - 1) - display_name = progressive_names[item_name][level] - acquired = True - if not display_name: - acquired = False - display_name = progressive_names[item_name][level + 1] - base_name = item_name.split(maxsplit=1)[1].lower() - display_data[base_name + "_acquired"] = acquired - display_data[base_name + "_icon"] = display_name + for location in tracker_data.get_player_locations(team, player): + location_name = tracker_data.location_id_to_name["A Link to the Past"][location] + location_checked = location in tracker_data.get_player_checked_locations(team, player) + for region, region_locations in known_regions.items(): + if location in region_locations: + regions[region]["locations"].append((location_name, location_checked)) + regions[region]["checked"] += 1 if location_checked else 0 + break + else: + # New or missed location in the tables above. Add it to an "unknown region", so it's not forgotten. + regions["Unknown"]["locations"].append((location_name, location_checked)) + regions["Unknown"]["checked"] += 1 if location_checked else 0 - # The single player tracker doesn't care about overworld, underworld, and total checks. Maybe it should? - sp_areas = ordered_areas[2:15] + # Sort locations in regions by name + for region in regions: + regions[region]["locations"].sort() return render_template( template_name_or_list="tracker__ALinkToThePast.html", @@ -893,15 +866,7 @@ def render_ALinkToThePast_tracker(tracker_data: TrackerData, team: int, player: player=player, inventory=inventory, player_name=tracker_data.get_player_name(team, player), - checks_done=checks_done, - checks_in_area=checks_in_area, - acquired_items={tracker_data.item_id_to_name["A Link to the Past"][id] for id in inventory}, - sp_areas=sp_areas, - small_key_ids=small_key_ids, - key_locations=player_small_key_locations, - big_key_ids=big_key_ids, - big_key_locations=player_big_key_locations, - **display_data, + regions=regions, ) _multiworld_trackers["A Link to the Past"] = render_ALinkToThePast_multiworld_tracker From 532cff13347d9f65ecc567dfe384386a5280c79c Mon Sep 17 00:00:00 2001 From: Zach Parks Date: Sat, 20 Apr 2024 17:29:41 -0500 Subject: [PATCH 098/153] ALTTP: Updates and refactors to multi-tracker and player tracker. (#3183) * ALTTP: Massive game tracker update. * Adds dropdowns separated by region for each location and its checked status. * Adds Bombs for bombless start seeds. * Adds Triforce Pieces to track. * Update icon image URLs to match in-game closer. * Fix issue with grouped progressive items. * Couple missed points. * Another edge case with details being refreshed. * Remove old commented out CSS * Consolidate a table and move an erroneous location in wrong region. * ALTTP: Updates and refactors to multi-tracker and player tracker. * Removed some missed commented out code. * Add triforce to prepare inventory logic. --- .../multitracker__ALinkToThePast.html | 355 +++++++------ .../templates/tracker__ALinkToThePast.html | 7 +- WebHostLib/tracker.py | 475 +++++------------- 3 files changed, 320 insertions(+), 517 deletions(-) diff --git a/WebHostLib/templates/multitracker__ALinkToThePast.html b/WebHostLib/templates/multitracker__ALinkToThePast.html index 8cea5ba05785..9b8f460c4cc3 100644 --- a/WebHostLib/templates/multitracker__ALinkToThePast.html +++ b/WebHostLib/templates/multitracker__ALinkToThePast.html @@ -6,52 +6,42 @@ {% endblock %} {# List all tracker-relevant icons. Format: (Name, Image URL) #} -{%- set icons = { - "Blue Shield": "https://www.zeldadungeon.net/wiki/images/8/85/Fighters-Shield.png", - "Red Shield": "https://www.zeldadungeon.net/wiki/images/5/55/Fire-Shield.png", - "Mirror Shield": "https://www.zeldadungeon.net/wiki/images/8/84/Mirror-Shield.png", - "Fighter Sword": "https://oyster.ignimgs.com/mediawiki/apis.ign.com/the-legend-of-zelda-a-link-to-the-past/4/40/SFighterSword.png?width=1920", - "Master Sword": "https://oyster.ignimgs.com/mediawiki/apis.ign.com/the-legend-of-zelda-a-link-to-the-past/6/65/SMasterSword.png?width=1920", - "Tempered Sword": "https://oyster.ignimgs.com/mediawiki/apis.ign.com/the-legend-of-zelda-a-link-to-the-past/9/92/STemperedSword.png?width=1920", - "Golden Sword": "https://oyster.ignimgs.com/mediawiki/apis.ign.com/the-legend-of-zelda-a-link-to-the-past/2/28/SGoldenSword.png?width=1920", - "Bow": "https://gamepedia.cursecdn.com/zelda_gamepedia_en/b/bc/ALttP_Bow_%26_Arrows_Sprite.png?version=5f85a70e6366bf473544ef93b274f74c", - "Silver Bow": "https://oyster.ignimgs.com/mediawiki/apis.ign.com/the-legend-of-zelda-a-link-to-the-past/6/65/Bow.png?width=1920", - "Green Mail": "https://oyster.ignimgs.com/mediawiki/apis.ign.com/the-legend-of-zelda-a-link-to-the-past/c/c9/SGreenTunic.png?width=1920", - "Blue Mail": "https://oyster.ignimgs.com/mediawiki/apis.ign.com/the-legend-of-zelda-a-link-to-the-past/9/98/SBlueTunic.png?width=1920", - "Red Mail": "https://oyster.ignimgs.com/mediawiki/apis.ign.com/the-legend-of-zelda-a-link-to-the-past/7/74/SRedTunic.png?width=1920", - "Power Glove": "https://oyster.ignimgs.com/mediawiki/apis.ign.com/the-legend-of-zelda-a-link-to-the-past/f/f5/SPowerGlove.png?width=1920", - "Titan Mitts": "https://oyster.ignimgs.com/mediawiki/apis.ign.com/the-legend-of-zelda-a-link-to-the-past/c/c1/STitanMitt.png?width=1920", - "Progressive Sword": "https://gamepedia.cursecdn.com/zelda_gamepedia_en/c/cc/ALttP_Master_Sword_Sprite.png?version=55869db2a20e157cd3b5c8f556097725", - "Pegasus Boots": "https://gamepedia.cursecdn.com/zelda_gamepedia_en/e/ed/ALttP_Pegasus_Shoes_Sprite.png?version=405f42f97240c9dcd2b71ffc4bebc7f9", - "Progressive Glove": "https://oyster.ignimgs.com/mediawiki/apis.ign.com/the-legend-of-zelda-a-link-to-the-past/c/c1/STitanMitt.png?width=1920", - "Flippers": "https://oyster.ignimgs.com/mediawiki/apis.ign.com/the-legend-of-zelda-a-link-to-the-past/4/4c/ZoraFlippers.png?width=1920", - "Moon Pearl": "https://gamepedia.cursecdn.com/zelda_gamepedia_en/6/63/ALttP_Moon_Pearl_Sprite.png?version=d601542d5abcc3e006ee163254bea77e", - "Progressive Bow": "https://gamepedia.cursecdn.com/zelda_gamepedia_en/b/bc/ALttP_Bow_%26_Arrows_Sprite.png?version=cfb7648b3714cccc80e2b17b2adf00ed", - "Blue Boomerang": "https://gamepedia.cursecdn.com/zelda_gamepedia_en/c/c3/ALttP_Boomerang_Sprite.png?version=96127d163759395eb510b81a556d500e", - "Red Boomerang": "https://gamepedia.cursecdn.com/zelda_gamepedia_en/b/b9/ALttP_Magical_Boomerang_Sprite.png?version=47cddce7a07bc3e4c2c10727b491f400", - "Hookshot": "https://gamepedia.cursecdn.com/zelda_gamepedia_en/2/24/Hookshot.png?version=c90bc8e07a52e8090377bd6ef854c18b", - "Mushroom": "https://gamepedia.cursecdn.com/zelda_gamepedia_en/3/35/ALttP_Mushroom_Sprite.png?version=1f1acb30d71bd96b60a3491e54bbfe59", - "Magic Powder": "https://www.zeldadungeon.net/wiki/images/thumb/6/62/MagicPowder-ALttP-Sprite.png/86px-MagicPowder-ALttP-Sprite.png", - "Fire Rod": "https://gamepedia.cursecdn.com/zelda_gamepedia_en/d/d6/FireRod.png?version=6eabc9f24d25697e2c4cd43ddc8207c0", - "Ice Rod": "https://gamepedia.cursecdn.com/zelda_gamepedia_en/d/d7/ALttP_Ice_Rod_Sprite.png?version=1f944148223d91cfc6a615c92286c3bc", - "Bombos": "https://gamepedia.cursecdn.com/zelda_gamepedia_en/8/8c/ALttP_Bombos_Medallion_Sprite.png?version=f4d6aba47fb69375e090178f0fc33b26", - "Ether": "https://gamepedia.cursecdn.com/zelda_gamepedia_en/3/3c/Ether.png?version=34027651a5565fcc5a83189178ab17b5", - "Quake": "https://gamepedia.cursecdn.com/zelda_gamepedia_en/5/56/ALttP_Quake_Medallion_Sprite.png?version=efd64d451b1831bd59f7b7d6b61b5879", - "Lamp": "https://gamepedia.cursecdn.com/zelda_gamepedia_en/6/63/ALttP_Lantern_Sprite.png?version=e76eaa1ec509c9a5efb2916698d5a4ce", - "Hammer": "https://gamepedia.cursecdn.com/zelda_gamepedia_en/d/d1/ALttP_Hammer_Sprite.png?version=e0adec227193818dcaedf587eba34500", - "Shovel": "https://gamepedia.cursecdn.com/zelda_gamepedia_en/c/c4/ALttP_Shovel_Sprite.png?version=e73d1ce0115c2c70eaca15b014bd6f05", - "Flute": "https://gamepedia.cursecdn.com/zelda_gamepedia_en/d/db/Flute.png?version=ec4982b31c56da2c0c010905c5c60390", - "Bug Catching Net": "https://gamepedia.cursecdn.com/zelda_gamepedia_en/5/54/Bug-CatchingNet.png?version=4d40e0ee015b687ff75b333b968d8be6", - "Book of Mudora": "https://gamepedia.cursecdn.com/zelda_gamepedia_en/2/22/ALttP_Book_of_Mudora_Sprite.png?version=11e4632bba54f6b9bf921df06ac93744", - "Bottle": "https://gamepedia.cursecdn.com/zelda_gamepedia_en/e/ef/ALttP_Magic_Bottle_Sprite.png?version=fd98ab04db775270cbe79fce0235777b", - "Cane of Somaria": "https://gamepedia.cursecdn.com/zelda_gamepedia_en/e/e1/ALttP_Cane_of_Somaria_Sprite.png?version=8cc1900dfd887890badffc903bb87943", - "Cane of Byrna": "https://gamepedia.cursecdn.com/zelda_gamepedia_en/b/bc/ALttP_Cane_of_Byrna_Sprite.png?version=758b607c8cbe2cf1900d42a0b3d0fb54", - "Cape": "https://gamepedia.cursecdn.com/zelda_gamepedia_en/1/1c/ALttP_Magic_Cape_Sprite.png?version=6b77f0d609aab0c751307fc124736832", - "Magic Mirror": "https://gamepedia.cursecdn.com/zelda_gamepedia_en/e/e5/ALttP_Magic_Mirror_Sprite.png?version=e035dbc9cbe2a3bd44aa6d047762b0cc", - "Triforce": "https://gamepedia.cursecdn.com/zelda_gamepedia_en/4/4e/TriforceALttPTitle.png?version=dc398e1293177581c16303e4f9d12a48", +{% set icons = { + "Blue Shield": "https://www.zeldadungeon.net/wiki/images/thumb/c/c3/FightersShield-ALttP-Sprite.png/100px-FightersShield-ALttP-Sprite.png", + "Red Shield": "https://www.zeldadungeon.net/wiki/images/thumb/9/9e/FireShield-ALttP-Sprite.png/111px-FireShield-ALttP-Sprite.png", + "Mirror Shield": "https://www.zeldadungeon.net/wiki/images/thumb/e/e3/MirrorShield-ALttP-Sprite.png/105px-MirrorShield-ALttP-Sprite.png", + "Progressive Sword": "https://static.wikia.nocookie.net/zelda_gamepedia_en/images/c/cc/ALttP_Master_Sword_Sprite.png", + "Progressive Bow": "https://www.zeldadungeon.net/wiki/images/thumb/8/8c/BowArrows-ALttP-Sprite.png/120px-BowArrows-ALttP-Sprite.png", + "Progressive Glove": "https://www.zeldadungeon.net/wiki/images/thumb/4/41/PowerGlove-ALttP-Sprite.png/105px-PowerGlove-ALttP-Sprite.png", + "Pegasus Boots": "https://gamepedia.cursecdn.com/zelda_gamepedia_en/e/ed/ALttP_Pegasus_Shoes_Sprite.png", + "Flippers": "https://www.zeldadungeon.net/wiki/images/thumb/b/bc/ZoraFlippers-ALttP-Sprite.png/112px-ZoraFlippers-ALttP-Sprite.png", + "Moon Pearl": "https://gamepedia.cursecdn.com/zelda_gamepedia_en/6/63/ALttP_Moon_Pearl_Sprite.png", + "Blue Boomerang": "https://www.zeldadungeon.net/wiki/images/thumb/f/f0/Boomerang-ALttP-Sprite.png/86px-Boomerang-ALttP-Sprite.png", + "Red Boomerang": "https://www.zeldadungeon.net/wiki/images/thumb/3/3c/MagicalBoomerang-ALttP-Sprite.png/86px-MagicalBoomerang-ALttP-Sprite.png", + "Hookshot": "https://gamepedia.cursecdn.com/zelda_gamepedia_en/2/24/Hookshot.png", + "Mushroom": "https://gamepedia.cursecdn.com/zelda_gamepedia_en/3/35/ALttP_Mushroom_Sprite.png", + "Magic Powder": "https://gamepedia.cursecdn.com/zelda_gamepedia_en/e/e5/ALttP_Magic_Powder_Sprite.png", + "Fire Rod": "https://gamepedia.cursecdn.com/zelda_gamepedia_en/d/d6/FireRod.png", + "Ice Rod": "https://gamepedia.cursecdn.com/zelda_gamepedia_en/d/d7/ALttP_Ice_Rod_Sprite.png", + "Bombos": "https://gamepedia.cursecdn.com/zelda_gamepedia_en/8/8c/ALttP_Bombos_Medallion_Sprite.png", + "Ether": "https://gamepedia.cursecdn.com/zelda_gamepedia_en/3/3c/Ether.png", + "Quake": "https://gamepedia.cursecdn.com/zelda_gamepedia_en/5/56/ALttP_Quake_Medallion_Sprite.png", + "Lamp": "https://gamepedia.cursecdn.com/zelda_gamepedia_en/6/63/ALttP_Lantern_Sprite.png", + "Hammer": "https://gamepedia.cursecdn.com/zelda_gamepedia_en/d/d1/ALttP_Hammer_Sprite.png", + "Shovel": "https://gamepedia.cursecdn.com/zelda_gamepedia_en/c/c4/ALttP_Shovel_Sprite.png", + "Flute": "https://gamepedia.cursecdn.com/zelda_gamepedia_en/d/db/Flute.png", + "Bug Catching Net": "https://gamepedia.cursecdn.com/zelda_gamepedia_en/5/54/Bug-CatchingNet.png", + "Book of Mudora": "https://gamepedia.cursecdn.com/zelda_gamepedia_en/2/22/ALttP_Book_of_Mudora_Sprite.png", + "Bottles": "https://gamepedia.cursecdn.com/zelda_gamepedia_en/e/ef/ALttP_Magic_Bottle_Sprite.png", + "Cane of Somaria": "https://gamepedia.cursecdn.com/zelda_gamepedia_en/e/e1/ALttP_Cane_of_Somaria_Sprite.png", + "Cane of Byrna": "https://gamepedia.cursecdn.com/zelda_gamepedia_en/b/bc/ALttP_Cane_of_Byrna_Sprite.png", + "Cape": "https://gamepedia.cursecdn.com/zelda_gamepedia_en/1/1c/ALttP_Magic_Cape_Sprite.png", + "Magic Mirror": "https://gamepedia.cursecdn.com/zelda_gamepedia_en/e/e5/ALttP_Magic_Mirror_Sprite.png", + "Triforce": "https://gamepedia.cursecdn.com/zelda_gamepedia_en/4/4e/TriforceALttPTitle.png", "Triforce Piece": "https://www.zeldadungeon.net/wiki/images/thumb/5/54/Triforce_Fragment_-_BS_Zelda.png/62px-Triforce_Fragment_-_BS_Zelda.png", - "Small Key": "https://gamepedia.cursecdn.com/zelda_gamepedia_en/f/f1/ALttP_Small_Key_Sprite.png?version=4f35d92842f0de39d969181eea03774e", - "Big Key": "https://gamepedia.cursecdn.com/zelda_gamepedia_en/3/33/ALttP_Big_Key_Sprite.png?version=136dfa418ba76c8b4e270f466fc12f4d", + "Bombs": "https://static.wikia.nocookie.net/zelda_gamepedia_en/images/3/38/ALttP_Bomb_Sprite.png", + "Small Key": "https://gamepedia.cursecdn.com/zelda_gamepedia_en/f/f1/ALttP_Small_Key_Sprite.png", + "Big Key": "https://gamepedia.cursecdn.com/zelda_gamepedia_en/3/33/ALttP_Big_Key_Sprite.png", "Chest": "https://gamepedia.cursecdn.com/zelda_gamepedia_en/7/73/ALttP_Treasure_Chest_Sprite.png?version=5f530ecd98dcb22251e146e8049c0dda", "Light World": "https://gamepedia.cursecdn.com/zelda_gamepedia_en/e/e7/ALttP_Soldier_Green_Sprite.png?version=d650d417934cd707a47e496489c268a6", "Dark World": "https://gamepedia.cursecdn.com/zelda_gamepedia_en/9/94/ALttP_Moblin_Sprite.png?version=ebf50e33f4657c377d1606bcc0886ddc", @@ -68,33 +58,93 @@ "Misery Mire": "https://gamepedia.cursecdn.com/zelda_gamepedia_en/8/85/ALttP_Vitreous_Sprite.png?version=92b2e9cb0aa63f831760f08041d8d8d8", "Turtle Rock": "https://gamepedia.cursecdn.com/zelda_gamepedia_en/9/91/ALttP_Trinexx_Sprite.png?version=0cc867d513952aa03edd155597a0c0be", "Ganons Tower": "https://gamepedia.cursecdn.com/zelda_gamepedia_en/b/b9/ALttP_Ganon_Sprite.png?version=956f51f054954dfff53c1a9d4f929c74", -} -%} +} %} + +{% set inventory_order = [ + "Progressive Sword", + "Progressive Bow", + "Blue Boomerang", + "Red Boomerang", + "Hookshot", + "Bombs", + "Mushroom", + "Magic Powder", + "Fire Rod", + "Ice Rod", + "Bombos", + "Ether", + "Quake", + "Lamp", + "Hammer", + "Flute", + "Bug Catching Net", + "Book of Mudora", + "Cane of Somaria", + "Cane of Byrna", + "Cape", + "Magic Mirror", + "Shovel", + "Pegasus Boots", + "Flippers", + "Progressive Glove", + "Moon Pearl", + "Bottles", + "Triforce Piece", + "Triforce", +] %} + +{% set dungeon_keys = { + "Hyrule Castle": ("Small Key (Hyrule Castle)", "Big Key (Hyrule Castle)"), + "Agahnims Tower": ("Small Key (Agahnims Tower)", "Big Key (Agahnims Tower)"), + "Eastern Palace": ("Small Key (Eastern Palace)", "Big Key (Eastern Palace)"), + "Desert Palace": ("Small Key (Desert Palace)", "Big Key (Desert Palace)"), + "Tower of Hera": ("Small Key (Tower of Hera)", "Big Key (Tower of Hera)"), + "Palace of Darkness": ("Small Key (Palace of Darkness)", "Big Key (Palace of Darkness)"), + "Thieves Town": ("Small Key (Thieves Town)", "Big Key (Thieves Town)"), + "Skull Woods": ("Small Key (Skull Woods)", "Big Key (Skull Woods)"), + "Swamp Palace": ("Small Key (Swamp Palace)", "Big Key (Swamp Palace)"), + "Ice Palace": ("Small Key (Ice Palace)", "Big Key (Ice Palace)"), + "Misery Mire": ("Small Key (Misery Mire)", "Big Key (Misery Mire)"), + "Turtle Rock": ("Small Key (Turtle Rock)", "Big Key (Turtle Rock)"), + "Ganons Tower": ("Small Key (Ganons Tower)", "Big Key (Ganons Tower)"), +} %} + +{% set multi_items = [ + "Progressive Sword", + "Progressive Glove", + "Progressive Bow", + "Bottles", + "Triforce Piece", +] %} {%- block custom_table_headers %} -{#- macro that creates a table header with display name and image -#} -{%- macro make_header(name, img_src) %} - - {{ name }} - -{% endmacro -%} - -{#- call the macro to build the table header -#} -{%- for name in tracking_names %} - {%- if name in icons -%} + {#- macro that creates a table header with display name and image -#} + {%- macro make_header(name, img_src) %} - {{ name | e }} + {{ name }} - {%- endif %} -{% endfor -%} + {% endmacro -%} + + {#- call the macro to build the table header -#} + {%- for item in inventory_order %} + {%- if item in icons -%} + + {{ item | e }} + + {%- endif %} + {% endfor -%} {% endblock %} {# build each row of custom entries #} {% block custom_table_row scoped %} - {%- for id in tracking_ids -%} -{# {{ checks }}#} - {%- if inventories[(team, player)][id] -%} + {%- for item in inventory_order -%} + {%- if inventories[(team, player)][item] -%} - {% if id in multi_items %}{{ inventories[(team, player)][id] }}{% else %}✔️{% endif %} + {% if item in multi_items %} + {{ inventories[(team, player)][item] }} + {% else %} + ✔️ + {% endif %} {%- else -%} @@ -104,102 +154,95 @@ {% block custom_tables %} -{% for team, _ in total_team_locations.items() %} -
- - - - - - {% for area in ordered_areas %} - {% set colspan = 1 %} - {% if area in key_locations %} - {% set colspan = colspan + 1 %} - {% endif %} - {% if area in big_key_locations %} - {% set colspan = colspan + 1 %} - {% endif %} - {% if area in icons %} - - {%- else -%} - - {%- endif -%} - {%- endfor -%} - - - - - {% for area in ordered_areas %} +{% for team in total_team_locations %} +
+
#Name - {{ area }}{{ area }}%Last
Activity
+ + + + + {% for region in known_regions %} + {% set colspan = 1 %} + {% if region == "Agahnims Tower" %} + {% set colspan = 2 %} + {% elif region in dungeon_keys %} + {% set colspan = 3 %} + {% endif %} + + {% if region in icons %} + + {% else %} + + {% endif %} + {% endfor %} + + + + + {% for region in known_regions %} + + + {% if region in dungeon_keys %} + + + {# Special check just for Agahnims Tower, which has no big keys. #} + {% if region != "Agahnims Tower" %} + + {% endif %} + {% endif %} + {% endfor %} + + {# For "total" checks #} - {% if area in key_locations %} - - {% endif %} - {% if area in big_key_locations %} - - {%- endif -%} - {%- endfor -%} - - - - {%- for (checks_team, player), area_checks in checks_done.items() if games[(team, player)] == current_tracker and team == checks_team -%} - - - - {%- for area in ordered_areas -%} - {% if (team, player) in checks_in_area and area in checks_in_area[(team, player)] %} - {%- set checks_done = area_checks[area] -%} - {%- set checks_total = checks_in_area[(team, player)][area] -%} - {%- if checks_done == checks_total -%} + + + + + {% for (player_team, player), player_regions in regions.items() if team == player_team %} + + + + + {% for region, counts in player_regions.items() %} - {%- else -%} - - {%- endif -%} - {%- if area in key_locations -%} - - {%- endif -%} - {%- if area in big_key_locations -%} - - {%- endif -%} - {% else %} - - {%- if area in key_locations -%} - - {%- endif -%} - {%- if area in big_key_locations -%} - - {%- endif -%} - {% endif %} - {%- endfor -%} - - - - {%- if activity_timers[(team, player)] -%} - - {%- else -%} - - {%- endif -%} - - {%- endfor -%} - -
#Name + {{ region }} + {{ region }}Total
+ Checks + + Small Key + + Big Key + - Checks + Checks - Small Key - - Big Key -
{{ player }}{{ player_names_with_alias[(team, player)] | e }}
+ + {{ player }} + + {{ player_names_with_alias[(team, player)] | e }} - {{ checks_done }}/{{ checks_total }}{{ checks_done }}/{{ checks_total }}{{ inventories[(team, player)][small_key_ids[area]] }}{% if inventories[(team, player)][big_key_ids[area]] %}✔️{% endif %} - {% set location_count = locations[(team, player)] | length %} - {%- if locations[(team, player)] | length > 0 -%} - {% set percentage_of_completion = locations_complete[(team, player)] / location_count * 100 %} - {{ "{0:.2f}".format(percentage_of_completion) }} - {%- else -%} - 100.00 - {%- endif -%} - {{ activity_timers[(team, player)].total_seconds() }}None
-
+ {{ counts.checked }}/{{ counts.total }} + + + {% if region in dungeon_keys %} + + {{ inventories[(team, player)][dungeon_keys[region][0]] }} + + + {# Special check just for Agahnims Tower, which has no big keys. #} + {% if region != "Agahnims Tower" %} + + {% if inventories[(team, player)][dungeon_keys[region][1]] %} + ✔️ + {% endif %} + + {% endif %} + {% endif %} + {% endfor %} + + {% endfor %} + + + + {% endfor %} {% endblock %} diff --git a/WebHostLib/templates/tracker__ALinkToThePast.html b/WebHostLib/templates/tracker__ALinkToThePast.html index 13a83a344765..99179797f443 100644 --- a/WebHostLib/templates/tracker__ALinkToThePast.html +++ b/WebHostLib/templates/tracker__ALinkToThePast.html @@ -68,9 +68,9 @@ "Desert Palace": ("Small Key (Desert Palace)", "Big Key (Desert Palace)"), "Tower of Hera": ("Small Key (Tower of Hera)", "Big Key (Tower of Hera)"), "Palace of Darkness": ("Small Key (Palace of Darkness)", "Big Key (Palace of Darkness)"), - "Thieves' Town": ("Small Key (Thieves Town)", "Big Key (Thieves Town)"), - "Skull Woods": ("Small Key (Skull Woods)", "Big Key (Skull Woods)"), "Swamp Palace": ("Small Key (Swamp Palace)", "Big Key (Swamp Palace)"), + "Thieves Town": ("Small Key (Thieves Town)", "Big Key (Thieves Town)"), + "Skull Woods": ("Small Key (Skull Woods)", "Big Key (Skull Woods)"), "Ice Palace": ("Small Key (Ice Palace)", "Big Key (Ice Palace)"), "Misery Mire": ("Small Key (Misery Mire)", "Big Key (Misery Mire)"), "Turtle Rock": ("Small Key (Turtle Rock)", "Big Key (Turtle Rock)"), @@ -146,7 +146,8 @@
BK
- {% for region_name, region_data in regions.items() %} + {% for region_name in known_regions %} + {% set region_data = regions[region_name] %} {% if region_data["locations"] | length > 0 %}
diff --git a/WebHostLib/tracker.py b/WebHostLib/tracker.py index 0ae7b2a5162c..e4d38c4641bf 100644 --- a/WebHostLib/tracker.py +++ b/WebHostLib/tracker.py @@ -1,7 +1,7 @@ import datetime import collections from dataclasses import dataclass -from typing import Any, Callable, Dict, List, Optional, Set, Tuple +from typing import Any, Callable, Dict, List, Optional, Set, Tuple, NamedTuple from uuid import UUID from flask import render_template @@ -456,210 +456,111 @@ def render_Factorio_multiworld_tracker(tracker_data: TrackerData, enabled_tracke _multiworld_trackers["Factorio"] = render_Factorio_multiworld_tracker if "A Link to the Past" in network_data_package["games"]: - def render_ALinkToThePast_multiworld_tracker(tracker_data: TrackerData, enabled_trackers: List[str]): - # Helper objects. - alttp_id_lookup = tracker_data.item_name_to_id["A Link to the Past"] + # Mapping from non-progressive item to progressive name and max level. + non_progressive_items = { + "Fighter Sword": ("Progressive Sword", 1), + "Master Sword": ("Progressive Sword", 2), + "Tempered Sword": ("Progressive Sword", 3), + "Golden Sword": ("Progressive Sword", 4), + "Power Glove": ("Progressive Glove", 1), + "Titans Mitts": ("Progressive Glove", 2), + "Bow": ("Progressive Bow", 1), + "Silver Bow": ("Progressive Bow", 2), + "Blue Mail": ("Progressive Mail", 1), + "Red Mail": ("Progressive Mail", 2), + "Blue Shield": ("Progressive Shield", 1), + "Red Shield": ("Progressive Shield", 2), + "Mirror Shield": ("Progressive Shield", 3), + } - multi_items = { - alttp_id_lookup[name] - for name in ("Progressive Sword", "Progressive Bow", "Bottle", "Progressive Glove", "Triforce Piece") - } - links = { - "Bow": "Progressive Bow", - "Silver Arrows": "Progressive Bow", - "Silver Bow": "Progressive Bow", - "Progressive Bow (Alt)": "Progressive Bow", - "Bottle (Red Potion)": "Bottle", - "Bottle (Green Potion)": "Bottle", - "Bottle (Blue Potion)": "Bottle", - "Bottle (Fairy)": "Bottle", - "Bottle (Bee)": "Bottle", - "Bottle (Good Bee)": "Bottle", - "Fighter Sword": "Progressive Sword", - "Master Sword": "Progressive Sword", - "Tempered Sword": "Progressive Sword", - "Golden Sword": "Progressive Sword", - "Power Glove": "Progressive Glove", - "Titans Mitts": "Progressive Glove", - } - links = {alttp_id_lookup[key]: alttp_id_lookup[value] for key, value in links.items()} - levels = { - "Fighter Sword": 1, - "Master Sword": 2, - "Tempered Sword": 3, - "Golden Sword": 4, - "Power Glove": 1, - "Titans Mitts": 2, - "Bow": 1, - "Silver Bow": 2, - "Triforce Piece": 90, - } - tracking_names = [ - "Progressive Sword", "Progressive Bow", "Book of Mudora", "Hammer", "Hookshot", "Magic Mirror", "Flute", - "Pegasus Boots", "Progressive Glove", "Flippers", "Moon Pearl", "Blue Boomerang", "Red Boomerang", - "Bug Catching Net", "Cape", "Shovel", "Lamp", "Mushroom", "Magic Powder", "Cane of Somaria", - "Cane of Byrna", "Fire Rod", "Ice Rod", "Bombos", "Ether", "Quake", "Bottle", "Triforce Piece", "Triforce", - ] - default_locations = { - "Light World": { - 1572864, 1572865, 60034, 1572867, 1572868, 60037, 1572869, 1572866, 60040, 59788, 60046, 60175, - 1572880, 60049, 60178, 1572883, 60052, 60181, 1572885, 60055, 60184, 191256, 60058, 60187, 1572884, - 1572886, 1572887, 1572906, 60202, 60205, 59824, 166320, 1010170, 60208, 60211, 60214, 60217, 59836, - 60220, 60223, 59839, 1573184, 60226, 975299, 1573188, 1573189, 188229, 60229, 60232, 1573193, - 1573194, 60235, 1573187, 59845, 59854, 211407, 60238, 59857, 1573185, 1573186, 1572882, 212328, - 59881, 59761, 59890, 59770, 193020, 212605 - }, - "Dark World": { - 59776, 59779, 975237, 1572870, 60043, 1572881, 60190, 60193, 60196, 60199, 60840, 1573190, 209095, - 1573192, 1573191, 60241, 60244, 60247, 60250, 59884, 59887, 60019, 60022, 60028, 60031 - }, - "Desert Palace": {1573216, 59842, 59851, 59791, 1573201, 59830}, - "Eastern Palace": {1573200, 59827, 59893, 59767, 59833, 59773}, - "Hyrule Castle": {60256, 60259, 60169, 60172, 59758, 59764, 60025, 60253}, - "Agahnims Tower": {60082, 60085}, - "Tower of Hera": {1573218, 59878, 59821, 1573202, 59896, 59899}, - "Swamp Palace": {60064, 60067, 60070, 59782, 59785, 60073, 60076, 60079, 1573204, 60061}, - "Thieves Town": {59905, 59908, 59911, 59914, 59917, 59920, 59923, 1573206}, - "Skull Woods": {59809, 59902, 59848, 59794, 1573205, 59800, 59803, 59806}, - "Ice Palace": {59872, 59875, 59812, 59818, 59860, 59797, 1573207, 59869}, - "Misery Mire": {60001, 60004, 60007, 60010, 60013, 1573208, 59866, 59998}, - "Turtle Rock": {59938, 59941, 59944, 1573209, 59947, 59950, 59953, 59956, 59926, 59929, 59932, 59935}, - "Palace of Darkness": { - 59968, 59971, 59974, 59977, 59980, 59983, 59986, 1573203, 59989, 59959, 59992, 59962, 59995, - 59965 - }, - "Ganons Tower": { - 60160, 60163, 60166, 60088, 60091, 60094, 60097, 60100, 60103, 60106, 60109, 60112, 60115, 60118, - 60121, 60124, 60127, 1573217, 60130, 60133, 60136, 60139, 60142, 60145, 60148, 60151, 60157 - }, - "Total": set() - } - key_only_locations = { - "Light World": set(), - "Dark World": set(), - "Desert Palace": {0x140031, 0x14002b, 0x140061, 0x140028}, - "Eastern Palace": {0x14005b, 0x140049}, - "Hyrule Castle": {0x140037, 0x140034, 0x14000d, 0x14003d}, - "Agahnims Tower": {0x140061, 0x140052}, - "Tower of Hera": set(), - "Swamp Palace": {0x140019, 0x140016, 0x140013, 0x140010, 0x14000a}, - "Thieves Town": {0x14005e, 0x14004f}, - "Skull Woods": {0x14002e, 0x14001c}, - "Ice Palace": {0x140004, 0x140022, 0x140025, 0x140046}, - "Misery Mire": {0x140055, 0x14004c, 0x140064}, - "Turtle Rock": {0x140058, 0x140007}, - "Palace of Darkness": set(), - "Ganons Tower": {0x140040, 0x140043, 0x14003a, 0x14001f}, - "Total": set() - } - location_to_area = {} - for area, locations in default_locations.items(): - for location in locations: - location_to_area[location] = area - for area, locations in key_only_locations.items(): - for location in locations: - location_to_area[location] = area - - checks_in_area = {area: len(checks) for area, checks in default_locations.items()} - checks_in_area["Total"] = 216 - ordered_areas = ( - "Light World", "Dark World", "Hyrule Castle", "Agahnims Tower", "Eastern Palace", "Desert Palace", - "Tower of Hera", "Palace of Darkness", "Swamp Palace", "Skull Woods", "Thieves Town", "Ice Palace", - "Misery Mire", "Turtle Rock", "Ganons Tower", "Total" - ) + progressive_item_max = { + "Progressive Sword": 4, + "Progressive Glove": 2, + "Progressive Bow": 2, + "Progressive Mail": 2, + "Progressive Shield": 3, + } - player_checks_in_area = { - (team, player): { - area_name: len(tracker_data._multidata["checks_in_area"][player][area_name]) - if area_name != "Total" else tracker_data._multidata["checks_in_area"][player]["Total"] - for area_name in ordered_areas - } - for team, players in tracker_data.get_all_slots().items() - for player in players - if tracker_data.get_slot_info(team, player).type != SlotType.group and - tracker_data.get_slot_info(team, player).game == "A Link to the Past" - } + bottle_items = [ + "Bottle", + "Bottle (Bee)", + "Bottle (Blue Potion)", + "Bottle (Fairy)", + "Bottle (Good Bee)", + "Bottle (Green Potion)", + "Bottle (Red Potion)", + ] + + known_regions = [ + "Light World", "Dark World", "Hyrule Castle", "Agahnims Tower", "Eastern Palace", "Desert Palace", + "Tower of Hera", "Palace of Darkness", "Swamp Palace", "Thieves Town", "Skull Woods", "Ice Palace", + "Misery Mire", "Turtle Rock", "Ganons Tower" + ] + + class RegionCounts(NamedTuple): + total: int + checked: int + + def prepare_inventories(team: int, player: int, inventory: collections.Counter[str], tracker_data: TrackerData): + for item, (prog_item, level) in non_progressive_items.items(): + if item in inventory: + inventory[prog_item] = min(max(inventory[prog_item], level), progressive_item_max[prog_item]) - tracking_ids = [] - for item in tracking_names: - tracking_ids.append(alttp_id_lookup[item]) - - # Can't wait to get this into the apworld. Oof. - from worlds.alttp import Items - - small_key_ids = {} - big_key_ids = {} - ids_small_key = {} - ids_big_key = {} - for item_name, data in Items.item_table.items(): - if "Key" in item_name: - area = item_name.split("(")[1][:-1] - if "Small" in item_name: - small_key_ids[area] = data[2] - ids_small_key[data[2]] = area - else: - big_key_ids[area] = data[2] - ids_big_key[data[2]] = area - - def _get_location_table(checks_table: dict) -> dict: - loc_to_area = {} - for area, locations in checks_table.items(): - if area == "Total": - continue - for location in locations: - loc_to_area[location] = area - return loc_to_area - - player_location_to_area = { - (team, player): _get_location_table(tracker_data._multidata["checks_in_area"][player]) - for team, players in tracker_data.get_all_slots().items() - for player in players - if tracker_data.get_slot_info(team, player).type != SlotType.group and - tracker_data.get_slot_info(team, player).game == "A Link to the Past" - } + for bottle in bottle_items: + inventory["Bottles"] = min(inventory["Bottles"] + inventory[bottle], 4) - checks_done: Dict[TeamPlayer, Dict[str: int]] = { - (team, player): {location_name: 0 for location_name in default_locations} - for team, players in tracker_data.get_all_slots().items() - for player in players - if tracker_data.get_slot_info(team, player).type != SlotType.group and - tracker_data.get_slot_info(team, player).game == "A Link to the Past" + if "Progressive Bow (Alt)" in inventory: + inventory["Progressive Bow"] += inventory["Progressive Bow (Alt)"] + inventory["Progressive Bow"] = min(inventory["Progressive Bow"], progressive_item_max["Progressive Bow"]) + + # Highlight 'bombs' if we received any bomb upgrades in bombless start. + # In race mode, we'll just assume bombless start for simplicity. + if tracker_data.get_slot_data(team, player).get("bombless_start", True): + inventory["Bombs"] = sum(count for item, count in inventory.items() if item.startswith("Bomb Upgrade")) + else: + inventory["Bombs"] = 1 + + # Triforce item if we meet goal. + if tracker_data.get_room_client_statuses()[team, player] == ClientStatus.CLIENT_GOAL: + inventory["Triforce"] = 1 + + def render_ALinkToThePast_multiworld_tracker(tracker_data: TrackerData, enabled_trackers: List[str]): + inventories: Dict[Tuple[int, int], collections.Counter[str]] = { + (team, player): collections.Counter({ + tracker_data.item_id_to_name["A Link to the Past"][code]: count + for code, count in tracker_data.get_player_inventory_counts(team, player).items() + }) + for team, players in tracker_data.get_all_players().items() + for player in players if tracker_data.get_slot_info(team, player).game == "A Link to the Past" } - inventories: Dict[TeamPlayer, Dict[int, int]] = {} - player_big_key_locations = {(player): set() for player in tracker_data.get_all_slots()[0]} - player_small_key_locations = {player: set() for player in tracker_data.get_all_slots()[0]} - group_big_key_locations = set() - group_key_locations = set() - - for (team, player), locations in checks_done.items(): - # Check if game complete. - if tracker_data.get_player_client_status(team, player) == ClientStatus.CLIENT_GOAL: - inventories[team, player][106] = 1 # Triforce - - # Count number of locations checked. - for location in tracker_data.get_player_checked_locations(team, player): - checks_done[team, player][player_location_to_area[team, player][location]] += 1 - checks_done[team, player]["Total"] += 1 - - # Count keys. - for location, (item, receiving, _) in tracker_data.get_player_locations(team, player).items(): - if item in ids_big_key: - player_big_key_locations[receiving].add(ids_big_key[item]) - elif item in ids_small_key: - player_small_key_locations[receiving].add(ids_small_key[item]) - - # Iterate over received items and build inventory/key counts. - inventories[team, player] = collections.Counter() - for network_item in tracker_data.get_player_received_items(team, player): - target_item = links.get(network_item.item, network_item.item) - if network_item.item in levels: # non-progressive - inventories[team, player][target_item] = (max(inventories[team, player][target_item], levels[network_item.item])) - else: - inventories[team, player][target_item] += 1 + # Translate non-progression items to progression items for tracker simplicity. + for (team, player), inventory in inventories.items(): + prepare_inventories(team, player, inventory, tracker_data) + + regions: Dict[Tuple[int, int], Dict[str, RegionCounts]] = { + (team, player): { + region_name: RegionCounts( + total=len(tracker_data._multidata["checks_in_area"][player][region_name]), + checked=sum( + 1 for location in tracker_data._multidata["checks_in_area"][player][region_name] + if location in tracker_data.get_player_checked_locations(team, player) + ), + ) + for region_name in known_regions + } + for team, players in tracker_data.get_all_players().items() + for player in players if tracker_data.get_slot_info(team, player).game == "A Link to the Past" + } - group_key_locations |= player_small_key_locations[player] - group_big_key_locations |= player_big_key_locations[player] + # Get a totals count. + for player, player_regions in regions.items(): + total = 0 + checked = 0 + for region, region_counts in player_regions.items(): + total += region_counts.total + checked += region_counts.checked + regions[player]["Total"] = RegionCounts(total, checked) return render_template( "multitracker__ALinkToThePast.html", @@ -682,16 +583,8 @@ def _get_location_table(checks_table: dict) -> dict: item_id_to_name=tracker_data.item_id_to_name, location_id_to_name=tracker_data.location_id_to_name, inventories=inventories, - tracking_names=tracking_names, - tracking_ids=tracking_ids, - multi_items=multi_items, - checks_done=checks_done, - ordered_areas=ordered_areas, - checks_in_area=player_checks_in_area, - key_locations=group_key_locations, - big_key_locations=group_big_key_locations, - small_key_ids=small_key_ids, - big_key_ids=big_key_ids, + regions=regions, + known_regions=known_regions, ) def render_ALinkToThePast_tracker(tracker_data: TrackerData, team: int, player: int) -> str: @@ -700,161 +593,26 @@ def render_ALinkToThePast_tracker(tracker_data: TrackerData, team: int, player: for code, count in tracker_data.get_player_inventory_counts(team, player).items() }) - # Mapping from non-progressive item to progressive name and max level. - non_progressive_items = { - "Fighter Sword": ("Progressive Sword", 1), - "Master Sword": ("Progressive Sword", 2), - "Tempered Sword": ("Progressive Sword", 3), - "Golden Sword": ("Progressive Sword", 4), - "Power Glove": ("Progressive Glove", 1), - "Titans Mitts": ("Progressive Glove", 2), - "Bow": ("Progressive Bow", 1), - "Silver Bow": ("Progressive Bow", 2), - "Blue Mail": ("Progressive Mail", 1), - "Red Mail": ("Progressive Mail", 2), - "Blue Shield": ("Progressive Shield", 1), - "Red Shield": ("Progressive Shield", 2), - "Mirror Shield": ("Progressive Shield", 3), - } - - progressive_item_max = { - "Progressive Sword": 4, - "Progressive Glove": 2, - "Progressive Bow": 2, - "Progressive Mail": 2, - "Progressive Shield": 3, - } - - bottle_items = [ - "Bottle", - "Bottle (Bee)", - "Bottle (Blue Potion)", - "Bottle (Fairy)", - "Bottle (Good Bee)", - "Bottle (Green Potion)", - "Bottle (Red Potion)", - ] - # Translate non-progression items to progression items for tracker simplicity. - for item, (prog_item, level) in non_progressive_items.items(): - if item in inventory: - inventory[prog_item] = min(max(inventory[prog_item], level), progressive_item_max[prog_item]) - - for bottle in bottle_items: - inventory["Bottles"] = min(inventory["Bottles"] + inventory[bottle], 4) - - if "Progressive Bow (Alt)" in inventory: - inventory["Progressive Bow"] += inventory["Progressive Bow (Alt)"] - inventory["Progressive Bow"] = min(inventory["Progressive Bow"], progressive_item_max["Progressive Bow"]) - - # Highlight 'bombs' if we received any bomb upgrades in bombless start. - # In race mode, we'll just assume bombless start for simplicity. - if tracker_data.get_slot_data(team, player).get("bombless_start", True): - inventory["Bombs"] = sum(count for item, count in inventory.items() if item.startswith("Bomb Upgrade")) - else: - inventory["Bombs"] = 1 - - known_regions = { - "Light World": { - 0x180013, 0x02eb18, 0x18014a, 0x180145, 0x033d68, 0x00eb0f, 0x00eb12, 0x00eb15, 0x00eb18, 0x00eb1b, - 0x02df45, 0x00e971, 0x0ee1c3, 0x180149, 0x00e9b0, 0x00e9d1, 0x00e97a, 0x00e98c, 0x00e9bc, 0x00e9ce, - 0x00e9e9, 0x00e9f2, 0x00ea82, 0x00ea85, 0x00ea88, 0x02f1fc, 0x00ea8e, 0x00ea91, 0x00ea94, 0x00ea97, - 0x00ea9a, 0x18002a, 0x180015, 0x0339cf, 0x033e7d, 0x180000, 0x180001, 0x180003, 0x180004, 0x180005, - 0x00eb42, 0x00eb45, 0x00eb48, 0x00eb4b, 0x180010, 0x00eb4e, 0x00eb3f, 0x180012, 0x180014, 0x180144, - 0x180142, 0x180143, 0x0289b0, 0x0f69fa, 0x180002, 0x00eb2a, 0x00eb2d, 0x00eb30, 0x00eb33, 0x00eb36, - 0x00eb39, 0x00eb3c, 0x00e9bf, 0x180016, 0x180017, 0x180140, 0x180141, 0x00e9c5, 0x400018, 0x400019, - 0x40001a, 0x400015, 0x400016, 0x400017, 0x400012, 0x400013, 0x400014, 0x40001b, 0x40001c, 0x40001d, - 0x400022, 0x400023, 0x400024, 0x400025, 0x400021, 0x40001e, 0x40001f, - }, - "Dark World": { - 0x180147, 0x0ee185, 0x0330c7, 0x180148, 0x00eb1e, 0x00eb21, 0x00eb24, 0x00eb27, 0x180011, 0x180006, - 0x00e980, 0x00e983, 0x00e9ec, 0x00e9ef, 0x00eda8, 0x180146, 0x00ea73, 0x00ea76, 0x00ea7c, 0x00ea7f, - 0x00ea8b, 0x00eb51, 0x00eb54, 0x00eb5a, 0x00eb57, 0x400000, 0x400001, 0x400002, 0x400006, 0x400007, - 0x400008, 0x400009, 0x40000a, 0x40000b, 0x40000f, 0x400010, 0x400011, 0x400003, 0x400004, 0x400005, - 0x40000c, 0x40000d, 0x40000e, - }, - "Hyrule Castle": { - 0x00e974, 0x00eb0c, 0x00eb09, 0x00e96e, 0x00eb5d, 0x00eb60, 0x00eb63, 0x00ea79, 0x140037, 0x140034, - 0x14000d, 0x14003d, - }, - "Agahnims Tower": { - 0x00eab5, 0x00eab2, 0x140061, 0x140052, - }, - "Eastern Palace": { - 0x00e977, 0x00e97d, 0x00e9b3, 0x00e9b9, 0x00e9f5, 0x180150, 0x14005b, 0x140049, - }, - "Desert Palace": { - 0x00e98f, 0x180160, 0x00e9b6, 0x00e9cb, 0x00e9c2, 0x180151, 0x140031, 0x14002b, 0x140028, - }, - "Tower of Hera": { - 0x180162, 0x00e9ad, 0x00e9e6, 0x00e9fb, 0x00e9f8, 0x180152 - }, - "Palace of Darkness": { - 0x00ea5b, 0x00ea3d, 0x00ea49, 0x00ea37, 0x00ea3a, 0x00ea52, 0x00ea43, 0x00ea4c, 0x00ea4f, 0x00ea55, - 0x00ea58, 0x00ea40, 0x00ea46, 0x180153, - }, - "Swamp Palace": { - 0x00ea9d, 0x00e986, 0x00e989, 0x00eaa0, 0x00eaa6, 0x00eaa3, 0x00eaa9, 0x00eaac, 0x00eaaf, 0x180154, - 0x140019, 0x140016, 0x140013, 0x140010, 0x14000a, - }, - "Thieves' Town": { - 0x00ea04, 0x00ea01, 0x00ea07, 0x00ea0a, 0x00ea0d, 0x00ea10, 0x00ea13, 0x180156, 0x14005e, 0x14004f, - }, - "Skull Woods": { - 0x00e992, 0x00e99b, 0x00e998, 0x00e9a1, 0x00e9c8, 0x00e99e, 0x00e9fe, 0x180155, 0x14002e, 0x14001c, - }, - "Ice Palace": { - 0x00e9d4, 0x00e995, 0x00e9aa, 0x00e9e3, 0x00e9e0, 0x00e9a4, 0x00e9dd, 0x180157, 0x140004, 0x140022, - 0x140025, 0x140046, - }, - "Misery Mire": { - 0x00ea67, 0x00ea6a, 0x00ea5e, 0x00ea61, 0x00e9da, 0x00ea64, 0x00ea6d, 0x180158, 0x140055, 0x14004c, - 0x140064, - }, - "Turtle Rock": { - 0x00ea22, 0x00ea1c, 0x00ea1f, 0x00ea16, 0x00ea25, 0x00ea19, 0x00ea34, 0x00ea31, 0x00ea2e, 0x00ea2b, - 0x00ea28, 0x180159, 0x140058, 0x140007, - }, - "Ganons Tower": { - 0x180161, 0x00ead9, 0x00eadc, 0x00eae2, 0x00eae5, 0x00eae8, 0x00eaeb, 0x00eaee, 0x00eab8, 0x00eabb, - 0x00eabe, 0x00eac1, 0x00ead3, 0x00ead0, 0x00eac4, 0x00eac7, 0x00eaca, 0x00eacd, 0x00eadf, 0x00eadf, - 0x00ead6, 0x00eaf4, 0x00eaf7, 0x00eaf1, 0x00eafd, 0x00eb00, 0x00eb03, 0x00eb06, 0x140040, 0x140043, - 0x14003a, 0x14001f, - }, - } + prepare_inventories(team, player, inventory, tracker_data) regions = { - "Light World": {"checked": 0, "locations": []}, - "Dark World": {"checked": 0, "locations": []}, - "Hyrule Castle": {"checked": 0, "locations": []}, - "Agahnims Tower": {"checked": 0, "locations": []}, - "Eastern Palace": {"checked": 0, "locations": []}, - "Desert Palace": {"checked": 0, "locations": []}, - "Tower of Hera": {"checked": 0, "locations": []}, - "Palace of Darkness": {"checked": 0, "locations": []}, - "Skull Woods": {"checked": 0, "locations": []}, - "Thieves' Town": {"checked": 0, "locations": []}, - "Swamp Palace": {"checked": 0, "locations": []}, - "Ice Palace": {"checked": 0, "locations": []}, - "Misery Mire": {"checked": 0, "locations": []}, - "Turtle Rock": {"checked": 0, "locations": []}, - "Ganons Tower": {"checked": 0, "locations": []}, - "Unknown": {"checked": 0, "locations": []}, + region_name: { + "checked": sum( + 1 for location in tracker_data._multidata["checks_in_area"][player][region_name] + if location in tracker_data.get_player_checked_locations(team, player) + ), + "locations": [ + ( + tracker_data.location_id_to_name["A Link to the Past"][location], + location in tracker_data.get_player_checked_locations(team, player) + ) + for location in tracker_data._multidata["checks_in_area"][player][region_name] + ], + } + for region_name in known_regions } - for location in tracker_data.get_player_locations(team, player): - location_name = tracker_data.location_id_to_name["A Link to the Past"][location] - location_checked = location in tracker_data.get_player_checked_locations(team, player) - for region, region_locations in known_regions.items(): - if location in region_locations: - regions[region]["locations"].append((location_name, location_checked)) - regions[region]["checked"] += 1 if location_checked else 0 - break - else: - # New or missed location in the tables above. Add it to an "unknown region", so it's not forgotten. - regions["Unknown"]["locations"].append((location_name, location_checked)) - regions["Unknown"]["checked"] += 1 if location_checked else 0 - # Sort locations in regions by name for region in regions: regions[region]["locations"].sort() @@ -867,6 +625,7 @@ def render_ALinkToThePast_tracker(tracker_data: TrackerData, team: int, player: inventory=inventory, player_name=tracker_data.get_player_name(team, player), regions=regions, + known_regions=known_regions, ) _multiworld_trackers["A Link to the Past"] = render_ALinkToThePast_multiworld_tracker From a45fa84382f28d826b461df4487506b2f853210d Mon Sep 17 00:00:00 2001 From: Zach Parks Date: Sat, 20 Apr 2024 18:39:33 -0500 Subject: [PATCH 099/153] Factorio: Fix 500 error on Factorio multi-tracker. (#3184) * Factorio: Fix 500 error on Factorio multi-tracker. * Hopefully this also fixes the webhost test failures. --- WebHostLib/tracker.py | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/WebHostLib/tracker.py b/WebHostLib/tracker.py index e4d38c4641bf..fd233da131e7 100644 --- a/WebHostLib/tracker.py +++ b/WebHostLib/tracker.py @@ -1,7 +1,7 @@ import datetime import collections from dataclasses import dataclass -from typing import Any, Callable, Dict, List, Optional, Set, Tuple, NamedTuple +from typing import Any, Callable, Dict, List, Optional, Set, Tuple, NamedTuple, Counter from uuid import UUID from flask import render_template @@ -422,11 +422,11 @@ def render_generic_multiworld_tracker(tracker_data: TrackerData, enabled_tracker if "Factorio" in network_data_package["games"]: def render_Factorio_multiworld_tracker(tracker_data: TrackerData, enabled_trackers: List[str]): - inventories: Dict[TeamPlayer, Dict[int, int]] = { - (team, player): { + inventories: Dict[TeamPlayer, collections.Counter[str]] = { + (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_slots().items() for player in players if tracker_data.get_player_game(team, player) == "Factorio" } @@ -501,7 +501,7 @@ class RegionCounts(NamedTuple): total: int checked: int - def prepare_inventories(team: int, player: int, inventory: collections.Counter[str], tracker_data: TrackerData): + def prepare_inventories(team: int, player: int, inventory: Counter[str], tracker_data: TrackerData): for item, (prog_item, level) in non_progressive_items.items(): if item in inventory: inventory[prog_item] = min(max(inventory[prog_item], level), progressive_item_max[prog_item]) @@ -525,7 +525,7 @@ def prepare_inventories(team: int, player: int, inventory: collections.Counter[s inventory["Triforce"] = 1 def render_ALinkToThePast_multiworld_tracker(tracker_data: TrackerData, enabled_trackers: List[str]): - inventories: Dict[Tuple[int, int], collections.Counter[str]] = { + inventories: Dict[Tuple[int, int], Counter[str]] = { (team, player): collections.Counter({ tracker_data.item_id_to_name["A Link to the Past"][code]: count for code, count in tracker_data.get_player_inventory_counts(team, player).items() From 0624ba5e815121c220e4f138de9e66e985aeca8f Mon Sep 17 00:00:00 2001 From: agilbert1412 Date: Sun, 21 Apr 2024 03:41:00 +0300 Subject: [PATCH 100/153] Stardew Valley: Options page documentation improvements (#3155) --- worlds/stardew_valley/options.py | 28 ++++++++++++++-------------- 1 file changed, 14 insertions(+), 14 deletions(-) diff --git a/worlds/stardew_valley/options.py b/worlds/stardew_valley/options.py index c1bd7a25c228..191a634496e4 100644 --- a/worlds/stardew_valley/options.py +++ b/worlds/stardew_valley/options.py @@ -10,23 +10,23 @@ class StardewValleyOption(Protocol): class Goal(Choice): - """What's your goal with this play-through? + """Goal for this playthrough Community Center: Complete the Community Center - Grandpa's Evaluation: Succeed Grandpa's evaluation with 4 lit candles - Bottom of the Mines: Reach level 120 in the mineshaft - Cryptic Note: Complete the quest "Cryptic Note" where Mr Qi asks you to reach floor 100 in the Skull Cavern - Master Angler: Catch every fish. Adapts to chosen Fishsanity option - Complete Collection: Complete the museum by donating every possible item. Pairs well with Museumsanity - Full House: Get married and have two children. Pairs well with Friendsanity - Greatest Walnut Hunter: Find all 130 Golden Walnuts - Protector of the Valley: Complete all the monster slayer goals. Adapts to Monstersanity - Full Shipment: Ship every item in the collection tab. Adapts to Shipsanity + Grandpa's Evaluation: 4 lit candles in Grandpa's evaluation + Bottom of the Mines: Reach level 120 in the mines + Cryptic Note: Complete the quest "Cryptic Note" (Skull Cavern Floor 100) + Master Angler: Catch every fish. Adapts to Fishsanity + Complete Collection: Complete the museum collection + Full House: Get married and have 2 children + Greatest Walnut Hunter: Find 130 Golden Walnuts + Protector of the Valley: Complete the monster slayer goals. Adapts to Monstersanity + Full Shipment: Ship every item. Adapts to Shipsanity Gourmet Chef: Cook every recipe. Adapts to Cooksanity - Craft Master: Craft every item. + Craft Master: Craft every item Legend: Earn 10 000 000g Mystery of the Stardrops: Find every stardrop Allsanity: Complete every check in your slot - Perfection: Attain Perfection, based on the vanilla definition + Perfection: Attain Perfection """ internal_name = "goal" display_name = "Goal" @@ -154,7 +154,7 @@ class EntranceRandomization(Choice): Disabled: No entrance randomization is done Pelican Town: Only doors in the main town area are randomized with each other Non Progression: Only entrances that are always available are randomized with each other - Buildings: All Entrances that Allow you to enter a building are randomized with each other + Buildings: All entrances that allow you to enter a building are randomized with each other Chaos: Same as "Buildings", but the entrances get reshuffled every single day! """ # Everything: All buildings and areas are randomized with each other @@ -457,7 +457,7 @@ class Cooksanity(Choice): class Chefsanity(NamedRange): - """Locations for leaning cooking recipes? + """Locations for learning cooking recipes? Vanilla: All cooking recipes are learned normally Queen of Sauce: Every Queen of sauce episode is a check, all queen of sauce recipes are items Purchases: Every purchasable recipe is a check From a50e68acd1385e282e84d7fbd66802a558e86897 Mon Sep 17 00:00:00 2001 From: Doug Hoskisson Date: Sat, 20 Apr 2024 17:42:27 -0700 Subject: [PATCH 101/153] Docs: style: multiline brackets (#3143) --- docs/style.md | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/docs/style.md b/docs/style.md index fbf681f28e97..81853f41725b 100644 --- a/docs/style.md +++ b/docs/style.md @@ -17,6 +17,15 @@ * Use type annotations where possible for function signatures and class members. * Use type annotations where appropriate for local variables (e.g. `var: List[int] = []`, or when the type is hard or impossible to deduce.) Clear annotations help developers look up and validate API calls. +* If a line ends with an open bracket/brace/parentheses, the matching closing bracket should be at the + beginning of a line at the same indentation as the beginning of the line with the open bracket. + ```python + stuff = { + x: y + for x, y in thing + if y > 2 + } + ``` * New classes, attributes, and methods in core code should have docstrings that follow [reST style](https://peps.python.org/pep-0287/). * Worlds that do not follow PEP8 should still have a consistent style across its files to make reading easier. From fc18f9caf907d178279267ddefb5a1e2555c2b9a Mon Sep 17 00:00:00 2001 From: Doug Hoskisson Date: Sat, 20 Apr 2024 17:43:13 -0700 Subject: [PATCH 102/153] Zillion: Docs: add information to skill option documentation (#3118) --- worlds/zillion/options.py | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) diff --git a/worlds/zillion/options.py b/worlds/zillion/options.py index 97f8b817f77c..0b94e3d63513 100644 --- a/worlds/zillion/options.py +++ b/worlds/zillion/options.py @@ -222,7 +222,14 @@ class ZillionEarlyScope(Toggle): class ZillionSkill(Range): - """ the difficulty level of the game """ + """ + the difficulty level of the game + + higher skill: + - can require more precise platforming movement + - lowers your defense + - gives you less time to escape at the end + """ range_start = 0 range_end = 5 default = 2 From b8e0d4c4ee89e55409ed79bdea19682a11e61f5d Mon Sep 17 00:00:00 2001 From: Flore Date: Sun, 21 Apr 2024 02:45:20 +0200 Subject: [PATCH 103/153] DS3: Update the setup docs to be more up to date (#2932) Co-authored-by: Exempt-Medic <60412657+Exempt-Medic@users.noreply.github.com> Co-authored-by: Nicholas Saylor <79181893+nicholassaylor@users.noreply.github.com> Co-authored-by: Moonlington --- worlds/dark_souls_3/docs/setup_en.md | 31 ++++++++++++++-------------- 1 file changed, 15 insertions(+), 16 deletions(-) diff --git a/worlds/dark_souls_3/docs/setup_en.md b/worlds/dark_souls_3/docs/setup_en.md index ed2cb867b827..61215dbc6043 100644 --- a/worlds/dark_souls_3/docs/setup_en.md +++ b/worlds/dark_souls_3/docs/setup_en.md @@ -25,29 +25,28 @@ To downpatch DS3 for use with Archipelago, use the following instructions from t 1. Launch Steam (in online mode). 2. Press the Windows Key + R. This will open the Run window. -3. Open the Steam console by typing the following string: steam://open/console , Steam should now open in Console Mode. -4. Insert the string of the depot you wish to download. For the AP supported v1.15, you will want to use: download_depot 374320 374321 4471176929659548333. -5. Steam will now download the depot. Note: There is no progress bar of the download in Steam, but it is still downloading in the background. -6. Turn off auto-updates in Steam by right-clicking Dark Souls III in your library > Properties > Updates > set "Automatic Updates" to "Only update this game when I launch it" (or change the value for AutoUpdateBehavior to 1 in "\Steam\steamapps\appmanifest_374320.acf"). -7. Back up your existing game folder in "\Steam\steamapps\common\DARK SOULS III". -8. Return back to Steam console. Once the download is complete, it should say so along with the temporary local directory in which the depot has been stored. This is usually something like "\Steam\steamapps\content\app_XXXXXX\depot_XXXXXX". Back up this game folder as well. -9. Delete your existing game folder in "\Steam\steamapps\common\DARK SOULS III", then replace it with your game folder in "\Steam\steamapps\content\app_XXXXXX\depot_XXXXXX". -10. Back up and delete your save file "DS30000.sl2" in AppData. AppData is hidden by default. To locate it, press Windows Key + R, type %appdata% and hit enter or: open File Explorer > View > Hidden Items and follow "C:\Users\your username\AppData\Roaming\DarkSoulsIII\numbers". -11. If you did all these steps correctly, you should be able to confirm your game version in the upper left corner after launching Dark Souls III. +3. Open the Steam console by typing the following string: `steam://open/console`. Steam should now open in Console Mode. +4. Insert the string of the depot you wish to download. For the AP-supported v1.15, you will want to use: `download_depot 374320 374321 4471176929659548333`. +5. Steam will now download the depot. Note: There is no progress bar for the download in Steam, but it is still downloading in the background. +6. Back up your existing game executable (`DarkSoulsIII.exe`) found in `\Steam\steamapps\common\DARK SOULS III\Game`. Easiest way to do this is to move it to another directory. If you have file extensions enabled, you can instead rename the executable to `DarkSoulsIII.exe.bak`. +7. Return to the Steam console. Once the download is complete, it should say so along with the temporary local directory in which the depot has been stored. This is usually something like `\Steam\steamapps\content\app_XXXXXX\depot_XXXXXX`. +8. Take the `DarkSoulsIII.exe` from that folder and place it in `\Steam\steamapps\common\DARK SOULS III\Game`. +9. Back up and delete your save file (`DS30000.sl2`) in AppData. AppData is hidden by default. To locate it, press Windows Key + R, type `%appdata%` and hit enter. Alternatively: open File Explorer > View > Hidden Items and follow `C:\Users\\AppData\Roaming\DarkSoulsIII\`. +10. If you did all these steps correctly, you should be able to confirm your game version in the upper-left corner after launching Dark Souls III. ## Installing the Archipelago mod -Get the dinput8.dll from the [Dark Souls III AP Client](https://github.com/Marechal-L/Dark-Souls-III-Archipelago-client/releases) and -add it at the root folder of your game (e.g. "SteamLibrary\steamapps\common\DARK SOULS III\Game") +Get the `dinput8.dll` from the [Dark Souls III AP Client](https://github.com/Marechal-L/Dark-Souls-III-Archipelago-client/releases) and +add it at the root folder of your game (e.g. `SteamLibrary\steamapps\common\DARK SOULS III\Game`) ## Joining a MultiWorld Game -1. Run Steam in offline mode, both to avoid being banned and to prevent Steam from updating the game files -2. Launch Dark Souls III -3. Type in "/connect {SERVER_IP}:{SERVER_PORT} {SLOT_NAME}" in the "Windows Command Prompt" that opened -4. Once connected, create a new game, choose a class and wait for the others before starting -5. You can quit and launch at anytime during a game +1. Run Steam in offline mode to avoid being banned. +2. Launch Dark Souls III. +3. Type in `/connect {SERVER_IP}:{SERVER_PORT} {SLOT_NAME} password:{PASSWORD}` in the "Windows Command Prompt" that opened. For example: `/connect archipelago.gg:38281 "Example Name" password:"Example Password"`. The password parameter is only necessary if your game requires one. +4. Once connected, create a new game, choose a class and wait for the others before starting. +5. You can quit and launch at anytime during a game. ## Where do I get a config file? From 5fcc1aa83f93cd59aa79b4aca10cefe1aaf26ab5 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Dana=C3=ABl=20V?= <104455676+ReverM@users.noreply.github.com> Date: Sat, 20 Apr 2024 20:48:14 -0400 Subject: [PATCH 104/153] Launcher: Adding Unrated mention to the launcher (#3097) --- Launcher.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Launcher.py b/Launcher.py index 9fd5d91df042..6426380dd726 100644 --- a/Launcher.py +++ b/Launcher.py @@ -102,7 +102,7 @@ def update_settings(): Component("Open Patch", func=open_patch), Component("Generate Template Options", func=generate_yamls), Component("Discord Server", icon="discord", func=lambda: webbrowser.open("https://discord.gg/8Z65BR2")), - Component("18+ Discord Server", icon="discord", func=lambda: webbrowser.open("https://discord.gg/fqvNCCRsu4")), + Component("Unrated/18+ Discord Server", icon="discord", func=lambda: webbrowser.open("https://discord.gg/fqvNCCRsu4")), Component("Browse Files", func=browse_files), ]) From a3702abe382b329ee412b136635ff6bee2614ede Mon Sep 17 00:00:00 2001 From: SunCat Date: Sun, 21 Apr 2024 03:49:00 +0300 Subject: [PATCH 105/153] CODEOWNERS: Update owner for ChecksFinder (#3089) --- docs/CODEOWNERS | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/docs/CODEOWNERS b/docs/CODEOWNERS index dc814aee2fa2..ffe63874553a 100644 --- a/docs/CODEOWNERS +++ b/docs/CODEOWNERS @@ -35,7 +35,7 @@ /worlds/celeste64/ @PoryGone # ChecksFinder -/worlds/checksfinder/ @jonloveslegos +/worlds/checksfinder/ @SunCatMC # Clique /worlds/clique/ @ThePhar From d4c8083be59c52bc95d89f739bea7cd773fde0a4 Mon Sep 17 00:00:00 2001 From: Aaron Wagener Date: Sat, 20 Apr 2024 19:49:48 -0500 Subject: [PATCH 106/153] Docs: Mention /check in the advanced yaml guide (#3092) Co-authored-by: Nicholas Saylor <79181893+nicholassaylor@users.noreply.github.com> --- worlds/generic/docs/advanced_settings_en.md | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/worlds/generic/docs/advanced_settings_en.md b/worlds/generic/docs/advanced_settings_en.md index 8e1b1cdb46c6..f4ac027befd7 100644 --- a/worlds/generic/docs/advanced_settings_en.md +++ b/worlds/generic/docs/advanced_settings_en.md @@ -31,7 +31,8 @@ website: [SublimeText Website](https://www.sublimetext.com) This program out of the box supports the correct formatting for the YAML file, so you will be able to use the tab key and get proper highlighting for any potential errors made while editing the file. If using any other text editor you -should ensure your indentation is done correctly with two spaces. +should ensure your indentation is done correctly with two spaces. After editing your YAML file, you can validate it at +the website's [validation page](/check). A typical YAML file will look like: @@ -281,7 +282,8 @@ reasonable, but submitting a ChecksFinder alongside another game OR submitting m OK) To configure your file to generate multiple worlds, use 3 dashes `---` on an empty line to separate the ending of one -world and the beginning of another world. +world and the beginning of another world. You can also combine multiple files by uploading them to the +[validation page](/check). ### Example From 5d8aca1b4eab4416de777aa12b34e702261409e5 Mon Sep 17 00:00:00 2001 From: Bryce Wilson Date: Sat, 20 Apr 2024 18:56:08 -0600 Subject: [PATCH 107/153] Pokemon Emerald: Temporary fix for missing items (#3162) --- worlds/pokemon_emerald/CHANGELOG.md | 2 ++ worlds/pokemon_emerald/client.py | 7 +++++++ 2 files changed, 9 insertions(+) diff --git a/worlds/pokemon_emerald/CHANGELOG.md b/worlds/pokemon_emerald/CHANGELOG.md index ec23ba5c5869..db92d980d36d 100644 --- a/worlds/pokemon_emerald/CHANGELOG.md +++ b/worlds/pokemon_emerald/CHANGELOG.md @@ -3,6 +3,8 @@ ### Fixes - Changed "Ho-oh" to "Ho-Oh" in options +- Temporary fix to alleviate problems with sometimes not receiving certain items just after connecting if `remote_items` +is `true`. - Temporarily disable a possible location for Marine Cave to spawn, as its causes an overflow # 2.0.0 diff --git a/worlds/pokemon_emerald/client.py b/worlds/pokemon_emerald/client.py index 169a5a796364..41dae57d38c1 100644 --- a/worlds/pokemon_emerald/client.py +++ b/worlds/pokemon_emerald/client.py @@ -199,6 +199,13 @@ async def game_watcher(self, ctx: "BizHawkClientContext") -> None: "items_handling": ctx.items_handling }])) + # Need to make sure items handling updates and we get the correct list of received items + # before continuing. Otherwise we might give some duplicate items and skip others. + # Should patch remote_items option value into the ROM in the future to guarantee we get the + # right item list before entering this part of the code + await asyncio.sleep(0.75) + return + try: guards: Dict[str, Tuple[int, bytes, str]] = {} From 915ad61ecfd0d45a0246aafb0665675c6246d9a6 Mon Sep 17 00:00:00 2001 From: Silvris <58583688+Silvris@users.noreply.github.com> Date: Sat, 20 Apr 2024 19:57:55 -0500 Subject: [PATCH 108/153] Core: fix unfilled items "Per-Player Count" (#2661) --- Fill.py | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/Fill.py b/Fill.py index cb143c408e0c..e65f027408c1 100644 --- a/Fill.py +++ b/Fill.py @@ -495,10 +495,9 @@ def mark_for_locking(location: Location): if unplaced or unfilled: logging.warning( f"Unplaced items({len(unplaced)}): {unplaced} - Unfilled Locations({len(unfilled)}): {unfilled}") - items_counter = Counter(location.item.player for location in multiworld.get_locations() if location.item) + items_counter = Counter(location.item.player for location in multiworld.get_filled_locations()) locations_counter = Counter(location.player for location in multiworld.get_locations()) items_counter.update(item.player for item in unplaced) - locations_counter.update(location.player for location in unfilled) print_data = {"items": items_counter, "locations": locations_counter} logging.info(f"Per-Player counts: {print_data})") From ad4451276d007d4a63a6720c26410fa7b9f8b9dd Mon Sep 17 00:00:00 2001 From: Chris Wilson Date: Sat, 20 Apr 2024 20:58:56 -0400 Subject: [PATCH 109/153] WebHost: Add `robots.txt` to WebHost (#3157) * Add a `robots.txt` file to prevent crawlers from scraping the site * Added `ASSET_RIGHTS` entry to config.yaml to control whether `/robots.txt` is served or not * Always import robots.py, determine config in route function * Finish writing a comment * Remove unnecessary redundant import and config --- WebHost.py | 2 +- WebHostLib/__init__.py | 3 ++- WebHostLib/robots.py | 14 ++++++++++++++ WebHostLib/static/robots.txt | 20 ++++++++++++++++++++ docs/webhost configuration sample.yaml | 10 +++++++--- 5 files changed, 44 insertions(+), 5 deletions(-) create mode 100644 WebHostLib/robots.py create mode 100644 WebHostLib/static/robots.txt diff --git a/WebHost.py b/WebHost.py index 8595fa7a27a4..8ccf6b68c2ee 100644 --- a/WebHost.py +++ b/WebHost.py @@ -23,7 +23,6 @@ def get_app(): from WebHostLib import register, cache, app as raw_app from WebHostLib.models import db - register() app = raw_app if os.path.exists(configpath) and not app.config["TESTING"]: import yaml @@ -34,6 +33,7 @@ def get_app(): app.config["HOST_ADDRESS"] = Utils.get_public_ipv4() logging.info(f"HOST_ADDRESS was set to {app.config['HOST_ADDRESS']}") + register() cache.init_app(app) db.bind(**app.config["PONY"]) db.generate_mapping(create_tables=True) diff --git a/WebHostLib/__init__.py b/WebHostLib/__init__.py index 43ca89f0b3f3..69314c334ee5 100644 --- a/WebHostLib/__init__.py +++ b/WebHostLib/__init__.py @@ -51,6 +51,7 @@ app.config["MAX_ROLL"] = 20 app.config["CACHE_TYPE"] = "SimpleCache" app.config["HOST_ADDRESS"] = "" +app.config["ASSET_RIGHTS"] = False cache = Cache() Compress(app) @@ -82,6 +83,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 + from . import tracker, upload, landing, check, generate, downloads, api, stats, misc, robots app.register_blueprint(api.api_endpoints) diff --git a/WebHostLib/robots.py b/WebHostLib/robots.py new file mode 100644 index 000000000000..410a92c8238c --- /dev/null +++ b/WebHostLib/robots.py @@ -0,0 +1,14 @@ +from WebHostLib import app +from flask import abort +from . import cache + + +@cache.cached() +@app.route('/robots.txt') +def robots(): + # If this host is not official, do not allow search engine crawling + if not app.config["ASSET_RIGHTS"]: + return app.send_static_file('robots.txt') + + # Send 404 if the host has affirmed this to be the official WebHost + abort(404) diff --git a/WebHostLib/static/robots.txt b/WebHostLib/static/robots.txt new file mode 100644 index 000000000000..770ae26c1985 --- /dev/null +++ b/WebHostLib/static/robots.txt @@ -0,0 +1,20 @@ +User-agent: Googlebot +Disallow: / + +User-agent: APIs-Google +Disallow: / + +User-agent: AdsBot-Google-Mobile +Disallow: / + +User-agent: AdsBot-Google-Mobile +Disallow: / + +User-agent: Mediapartners-Google +Disallow: / + +User-agent: Google-Safety +Disallow: / + +User-agent: * +Disallow: / diff --git a/docs/webhost configuration sample.yaml b/docs/webhost configuration sample.yaml index 70050b0590d6..d0556453b388 100644 --- a/docs/webhost configuration sample.yaml +++ b/docs/webhost configuration sample.yaml @@ -1,4 +1,4 @@ -# This is a sample configuration for the Web host. +# This is a sample configuration for the Web host. # If you wish to change any of these, rename this file to config.yaml # Default values are shown here. Uncomment and change the values as desired. @@ -25,7 +25,7 @@ # Secret key used to determine important things like cookie authentication of room/seed page ownership. # If you wish to deploy, uncomment the following line and set it to something not easily guessable. -# SECRET_KEY: "Your secret key here" +# SECRET_KEY: "Your secret key here" # TODO #JOB_THRESHOLD: 2 @@ -38,7 +38,7 @@ # provider: "sqlite" # filename: "ap.db3" # This MUST be the ABSOLUTE PATH to the file. # create_db: true - + # Maximum number of players that are allowed to be rolled on the server. After this limit, one should roll locally and upload the results. #MAX_ROLL: 20 @@ -50,3 +50,7 @@ # Host Address. This is the address encoded into the patch that will be used for client auto-connect. #HOST_ADDRESS: archipelago.gg + +# Asset redistribution rights. If true, the host affirms they have been given explicit permission to redistribute +# the proprietary assets in WebHostLib +#ASSET_RIGHTS: false From 442c7d04db61323af24f4ad90a6d5a1b3d8aa3fa Mon Sep 17 00:00:00 2001 From: Scipio Wright Date: Sat, 20 Apr 2024 21:37:28 -0400 Subject: [PATCH 110/153] Core: Silently fix invalid yaml option for Toggles (#3179) --- Options.py | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/Options.py b/Options.py index 65affb8d250e..fc6335899d02 100644 --- a/Options.py +++ b/Options.py @@ -384,7 +384,8 @@ class Toggle(NumericOption): default = 0 def __init__(self, value: int): - assert value == 0 or value == 1, "value of Toggle can only be 0 or 1" + # if user puts in an invalid value, make it valid + value = int(bool(value)) self.value = value @classmethod From 392c47dcef7829db38611772f47dd8ea268138d0 Mon Sep 17 00:00:00 2001 From: Fabian Dill Date: Sun, 21 Apr 2024 03:47:01 +0200 Subject: [PATCH 111/153] MultiServer: add datastore list command to MultiServer (#3181) --- MultiServer.py | 12 ++++++++++++ 1 file changed, 12 insertions(+) diff --git a/MultiServer.py b/MultiServer.py index 3052046a343d..4936eb8c047c 100644 --- a/MultiServer.py +++ b/MultiServer.py @@ -2163,6 +2163,18 @@ def value_type(input_text: str): self.ctx.broadcast_all([{"cmd": "RoomUpdate", option_name: getattr(self.ctx, option_name)}]) return True + def _cmd_datastore(self): + """Debug Tool: list writable datastorage keys and approximate the size of their values with pickle.""" + total: int = 0 + texts = [] + for key, value in self.ctx.stored_data.items(): + size = len(pickle.dumps(value)) + total += size + texts.append(f"Key: {key} | Size: {size}B") + texts.insert(0, f"Found {len(self.ctx.stored_data)} keys, " + f"approximately totaling {Utils.format_SI_prefix(total, power=1024)}B") + self.output("\n".join(texts)) + async def console(ctx: Context): import sys From 3e27b93c373273489070f9d31d98f0ea8a3d84a9 Mon Sep 17 00:00:00 2001 From: Silvris <58583688+Silvris@users.noreply.github.com> Date: Sun, 21 Apr 2024 09:59:19 -0500 Subject: [PATCH 112/153] SNIClient: set SNESState to SNES_DISCONNECTED when disconnected (#3188) --- SNIClient.py | 1 + 1 file changed, 1 insertion(+) diff --git a/SNIClient.py b/SNIClient.py index 1804ab3cc08d..cf4ef758ff7d 100644 --- a/SNIClient.py +++ b/SNIClient.py @@ -85,6 +85,7 @@ def _cmd_snes_close(self) -> bool: """Close connection to a currently connected snes""" self.ctx.snes_reconnect_address = None self.ctx.cancel_snes_autoreconnect() + self.ctx.snes_state = SNESState.SNES_DISCONNECTED if self.ctx.snes_socket and not self.ctx.snes_socket.closed: async_start(self.ctx.snes_socket.close()) return True From 6aafa6ff0401696208270fc29b6c98632f7a2cc2 Mon Sep 17 00:00:00 2001 From: Scipio Wright Date: Sun, 21 Apr 2024 11:00:16 -0400 Subject: [PATCH 113/153] TUNIC: Fix minimal Heir access in ladder shuffle (#3189) --- worlds/tunic/er_rules.py | 2 +- worlds/tunic/er_scripts.py | 10 ++++++++-- worlds/tunic/rules.py | 3 ++- 3 files changed, 11 insertions(+), 4 deletions(-) diff --git a/worlds/tunic/er_rules.py b/worlds/tunic/er_rules.py index 3c0b9b47d086..dde142c88abc 100644 --- a/worlds/tunic/er_rules.py +++ b/worlds/tunic/er_rules.py @@ -986,7 +986,7 @@ def set_er_region_rules(world: "TunicWorld", ability_unlocks: Dict[str, int], re connecting_region=regions["Spirit Arena Victory"], rule=lambda state: (state.has(gold_hexagon, player, world.options.hexagon_goal.value) if world.options.hexagon_quest else - state.has_all({red_hexagon, green_hexagon, blue_hexagon}, player))) + state.has_all({red_hexagon, green_hexagon, blue_hexagon, "Unseal the Heir"}, player))) # connecting the regions portals are in to other portals you can access via ladder storage # using has_stick instead of can_ladder_storage since it's already checking the logic rules diff --git a/worlds/tunic/er_scripts.py b/worlds/tunic/er_scripts.py index ffd3ae30de4e..3f70af83c0cc 100644 --- a/worlds/tunic/er_scripts.py +++ b/worlds/tunic/er_scripts.py @@ -69,7 +69,8 @@ def create_er_regions(world: "TunicWorld") -> Dict[Portal, Portal]: "Quarry Fuse": "Quarry", "Ziggurat Fuse": "Rooted Ziggurat Lower Back", "West Garden Fuse": "West Garden", - "Library Fuse": "Library Lab" + "Library Fuse": "Library Lab", + "Place Questagons": "Sealed Temple", } @@ -77,7 +78,12 @@ def place_event_items(world: "TunicWorld", regions: Dict[str, Region]) -> None: for event_name, region_name in tunic_events.items(): region = regions[region_name] location = TunicERLocation(world.player, event_name, None, region) - if event_name.endswith("Bell"): + if event_name == "Place Questagons": + if world.options.hexagon_quest: + continue + location.place_locked_item( + TunicERItem("Unseal the Heir", ItemClassification.progression, None, world.player)) + elif event_name.endswith("Bell"): location.place_locked_item( TunicERItem("Ring " + event_name, ItemClassification.progression, None, world.player)) else: diff --git a/worlds/tunic/rules.py b/worlds/tunic/rules.py index a9e5fa0f3589..12810cfa2670 100644 --- a/worlds/tunic/rules.py +++ b/worlds/tunic/rules.py @@ -129,7 +129,8 @@ def set_region_rules(world: "TunicWorld", ability_unlocks: Dict[str, int]) -> No multiworld.get_entrance("Overworld -> Spirit Arena", player).access_rule = \ lambda state: (state.has(gold_hexagon, player, options.hexagon_goal.value) if options.hexagon_quest.value else state.has_all({red_hexagon, green_hexagon, blue_hexagon}, player)) and \ - has_ability(state, player, prayer, options, ability_unlocks) and has_sword(state, player) + has_ability(state, player, prayer, options, ability_unlocks) and has_sword(state, player) and \ + state.has_any({lantern, laurels}, player) def set_location_rules(world: "TunicWorld", ability_unlocks: Dict[str, int]) -> None: From 49c0268a8424310b92900953e50871a7687cb403 Mon Sep 17 00:00:00 2001 From: Zach Parks Date: Sun, 21 Apr 2024 11:37:24 -0500 Subject: [PATCH 114/153] MultiServer: Fix `/alias ` not removing aliases. (#3186) --- MultiServer.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/MultiServer.py b/MultiServer.py index 4936eb8c047c..bfbed4620218 100644 --- a/MultiServer.py +++ b/MultiServer.py @@ -1905,7 +1905,7 @@ def _cmd_exit(self) -> bool: @mark_raw def _cmd_alias(self, player_name_then_alias_name): """Set a player's alias, by listing their base name and then their intended alias.""" - player_name, alias_name = player_name_then_alias_name.split(" ", 1) + player_name, _, alias_name = player_name_then_alias_name.partition(" ") player_name, usable, response = get_intended_text(player_name, self.ctx.player_names.values()) if usable: for (team, slot), name in self.ctx.player_names.items(): From ec18254e9ec86da8e9fba2293b8321f74441e189 Mon Sep 17 00:00:00 2001 From: Scipio Wright Date: Sun, 21 Apr 2024 12:39:37 -0400 Subject: [PATCH 115/153] TUNIC: Minor edits to game page (#3182) * Minor edits to game page * in -> of --- worlds/tunic/docs/en_TUNIC.md | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/worlds/tunic/docs/en_TUNIC.md b/worlds/tunic/docs/en_TUNIC.md index f1e0056041bb..57a9167d1906 100644 --- a/worlds/tunic/docs/en_TUNIC.md +++ b/worlds/tunic/docs/en_TUNIC.md @@ -6,7 +6,7 @@ The [player options page for this game](../player-options) contains all the opti ## I haven't played TUNIC before. -**Play vanilla first.** It is **_heavily discouraged_** to play this randomizer before playing the vanilla game. +**Play vanilla first.** It is **_heavily discouraged_** to play this randomizer before playing the vanilla game. It is recommended that you achieve both endings in the vanilla game before playing the randomizer. ## What does randomization do to this game? @@ -32,7 +32,7 @@ being to find the required amount of them and then Share Your Wisdom. Every item has a chance to appear in another player's world. ## How many checks are in TUNIC? -There are 302 checks located across the world of TUNIC. +There are 302 checks located across the world of TUNIC. The Fairy Seeking Spell can help you locate them. ## What do items from other worlds look like in TUNIC? Items belonging to other TUNIC players will either appear as that item directly (if in a freestanding location) or in a @@ -51,6 +51,7 @@ There is an [entrance tracker](https://scipiowright.gitlab.io/tunic-tracker/) fo You can also use the Universal Tracker (by Faris and qwint) to find a complete list of what checks are in logic with your current items. You can find it on the Archipelago Discord, in its post in the future-game-design channel. This tracker is an extension of the regular Archipelago Text Client. ## What should I know regarding logic? +In general: - Nighttime is not considered in logic. Every check in the game is obtainable during the day. - 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. From ee69fa6a8cd76f47f05f83cb7a05afd2545f112d Mon Sep 17 00:00:00 2001 From: Kaito Sinclaire Date: Sun, 21 Apr 2024 09:44:17 -0700 Subject: [PATCH 116/153] SMZ3: Use correct font tiles for cross-world items in SM (#3095) --- worlds/smz3/__init__.py | 128 +++++++++++++++++++++++++--------------- 1 file changed, 81 insertions(+), 47 deletions(-) diff --git a/worlds/smz3/__init__.py b/worlds/smz3/__init__.py index 04c376f3c87d..b030e3fa50d2 100644 --- a/worlds/smz3/__init__.py +++ b/worlds/smz3/__init__.py @@ -284,55 +284,89 @@ def apply_sm_custom_sprite(self): return offworldSprites def convert_to_sm_item_name(self, itemName): - charMap = { "A" : 0x3CE0, - "B" : 0x3CE1, - "C" : 0x3CE2, - "D" : 0x3CE3, - "E" : 0x3CE4, - "F" : 0x3CE5, - "G" : 0x3CE6, - "H" : 0x3CE7, - "I" : 0x3CE8, - "J" : 0x3CE9, - "K" : 0x3CEA, - "L" : 0x3CEB, - "M" : 0x3CEC, - "N" : 0x3CED, - "O" : 0x3CEE, - "P" : 0x3CEF, - "Q" : 0x3CF0, - "R" : 0x3CF1, - "S" : 0x3CF2, - "T" : 0x3CF3, - "U" : 0x3CF4, - "V" : 0x3CF5, - "W" : 0x3CF6, - "X" : 0x3CF7, - "Y" : 0x3CF8, - "Z" : 0x3CF9, - " " : 0x3C4E, - "!" : 0x3CFF, - "?" : 0x3CFE, - "'" : 0x3CFD, - "," : 0x3CFB, - "." : 0x3CFA, - "-" : 0x3CCF, - "_" : 0x000E, - "1" : 0x3C00, - "2" : 0x3C01, - "3" : 0x3C02, - "4" : 0x3C03, - "5" : 0x3C04, - "6" : 0x3C05, - "7" : 0x3C06, - "8" : 0x3C07, - "9" : 0x3C08, - "0" : 0x3C09, - "%" : 0x3C0A} + # SMZ3 uses a different font; this map is not compatible with just SM alone. + charMap = { + "A": 0x3CE0, + "B": 0x3CE1, + "C": 0x3CE2, + "D": 0x3CE3, + "E": 0x3CE4, + "F": 0x3CE5, + "G": 0x3CE6, + "H": 0x3CE7, + "I": 0x3CE8, + "J": 0x3CE9, + "K": 0x3CEA, + "L": 0x3CEB, + "M": 0x3CEC, + "N": 0x3CED, + "O": 0x3CEE, + "P": 0x3CEF, + "Q": 0x3CF0, + "R": 0x3CF1, + "S": 0x3CF2, + "T": 0x3CF3, + "U": 0x3CF4, + "V": 0x3CF5, + "W": 0x3CF6, + "X": 0x3CF7, + "Y": 0x3CF8, + "Z": 0x3CF9, + " ": 0x3C4E, + "!": 0x3CFF, + "?": 0x3CFE, + "'": 0x3CFD, + ",": 0x3CFB, + ".": 0x3CFA, + "-": 0x3CCF, + "1": 0x3C80, + "2": 0x3C81, + "3": 0x3C82, + "4": 0x3C83, + "5": 0x3C84, + "6": 0x3C85, + "7": 0x3C86, + "8": 0x3C87, + "9": 0x3C88, + "0": 0x3C89, + "%": 0x3C0A, + "a": 0x3C90, + "b": 0x3C91, + "c": 0x3C92, + "d": 0x3C93, + "e": 0x3C94, + "f": 0x3C95, + "g": 0x3C96, + "h": 0x3C97, + "i": 0x3C98, + "j": 0x3C99, + "k": 0x3C9A, + "l": 0x3C9B, + "m": 0x3C9C, + "n": 0x3C9D, + "o": 0x3C9E, + "p": 0x3C9F, + "q": 0x3CA0, + "r": 0x3CA1, + "s": 0x3CA2, + "t": 0x3CA3, + "u": 0x3CA4, + "v": 0x3CA5, + "w": 0x3CA6, + "x": 0x3CA7, + "y": 0x3CA8, + "z": 0x3CA9, + '"': 0x3CAA, + ":": 0x3CAB, + "~": 0x3CAC, + "@": 0x3CAD, + "#": 0x3CAE, + "+": 0x3CAF, + "_": 0x000E + } data = [] - itemName = itemName.upper()[:26] - itemName = itemName.strip() + itemName = itemName.replace("_", "-").strip()[:26] itemName = itemName.center(26, " ") itemName = "___" + itemName + "___" From e22ac85e158d3801dbe86feea2e62e12631b9460 Mon Sep 17 00:00:00 2001 From: NewSoupVi <57900059+NewSoupVi@users.noreply.github.com> Date: Sun, 21 Apr 2024 18:45:39 +0200 Subject: [PATCH 117/153] The Witness: More door renames (#3131) --- worlds/witness/data/WitnessItems.txt | 4 ++-- worlds/witness/data/WitnessLogic.txt | 2 +- worlds/witness/data/WitnessLogicExpert.txt | 2 +- worlds/witness/data/WitnessLogicVanilla.txt | 2 +- worlds/witness/data/settings/Door_Shuffle/Complex_Doors.txt | 4 ++-- 5 files changed, 7 insertions(+), 7 deletions(-) diff --git a/worlds/witness/data/WitnessItems.txt b/worlds/witness/data/WitnessItems.txt index 86567f29e2e8..782fa9c3d226 100644 --- a/worlds/witness/data/WitnessItems.txt +++ b/worlds/witness/data/WitnessItems.txt @@ -177,7 +177,7 @@ Doors: 1774 - Bunker Elevator Room Entry (Door) - 0x0A08D 1777 - Swamp Entry (Door) - 0x00C1C 1780 - Swamp Between Bridges First Door - 0x184B7 -1783 - Swamp Platform Shortcut Door - 0x38AE6 +1783 - Swamp Platform Shortcut (Door) - 0x38AE6 1786 - Swamp Cyan Water Pump (Door) - 0x04B7F 1789 - Swamp Between Bridges Second Door - 0x18507 1792 - Swamp Red Water Pump (Door) - 0x183F2 @@ -201,7 +201,7 @@ Doors: 1849 - Caves Pillar Door - 0x019A5 1855 - Caves Swamp Shortcut (Door) - 0x2D859 1858 - Challenge Entry (Door) - 0x0A19A -1861 - Challenge Tunnels Entry (Door) - 0x0348A +1861 - Tunnels Entry (Door) - 0x0348A 1864 - Tunnels Theater Shortcut (Door) - 0x27739 1867 - Tunnels Desert Shortcut (Door) - 0x27263 1870 - Tunnels Town Shortcut (Door) - 0x09E87 diff --git a/worlds/witness/data/WitnessLogic.txt b/worlds/witness/data/WitnessLogic.txt index e3bacfb4b0e4..4dc172ace0dd 100644 --- a/worlds/witness/data/WitnessLogic.txt +++ b/worlds/witness/data/WitnessLogic.txt @@ -766,7 +766,7 @@ Swamp Near Platform (Swamp) - Swamp Cyan Underwater - 0x04B7F - Swamp Near Boat Door - 0x184B7 (Between Bridges First Door) - 0x00990 158317 - 0x17C0D (Platform Shortcut Left Panel) - True - Shapers 158318 - 0x17C0E (Platform Shortcut Right Panel) - 0x17C0D - Shapers -Door - 0x38AE6 (Platform Shortcut Door) - 0x17C0E +Door - 0x38AE6 (Platform Shortcut) - 0x17C0E Door - 0x04B7F (Cyan Water Pump) - 0x00006 Swamp Cyan Underwater (Swamp): diff --git a/worlds/witness/data/WitnessLogicExpert.txt b/worlds/witness/data/WitnessLogicExpert.txt index b01d5551ec55..b08ef9e4d998 100644 --- a/worlds/witness/data/WitnessLogicExpert.txt +++ b/worlds/witness/data/WitnessLogicExpert.txt @@ -766,7 +766,7 @@ Swamp Near Platform (Swamp) - Swamp Cyan Underwater - 0x04B7F - Swamp Near Boat Door - 0x184B7 (Between Bridges First Door) - 0x00990 158317 - 0x17C0D (Platform Shortcut Left Panel) - True - Rotated Shapers 158318 - 0x17C0E (Platform Shortcut Right Panel) - 0x17C0D - Rotated Shapers -Door - 0x38AE6 (Platform Shortcut Door) - 0x17C0E +Door - 0x38AE6 (Platform Shortcut) - 0x17C0E Door - 0x04B7F (Cyan Water Pump) - 0x00006 Swamp Cyan Underwater (Swamp): diff --git a/worlds/witness/data/WitnessLogicVanilla.txt b/worlds/witness/data/WitnessLogicVanilla.txt index 62c38d412427..09504187cfe3 100644 --- a/worlds/witness/data/WitnessLogicVanilla.txt +++ b/worlds/witness/data/WitnessLogicVanilla.txt @@ -766,7 +766,7 @@ Swamp Near Platform (Swamp) - Swamp Cyan Underwater - 0x04B7F - Swamp Near Boat Door - 0x184B7 (Between Bridges First Door) - 0x00990 158317 - 0x17C0D (Platform Shortcut Left Panel) - True - Shapers 158318 - 0x17C0E (Platform Shortcut Right Panel) - 0x17C0D - Shapers -Door - 0x38AE6 (Platform Shortcut Door) - 0x17C0E +Door - 0x38AE6 (Platform Shortcut) - 0x17C0E Door - 0x04B7F (Cyan Water Pump) - 0x00006 Swamp Cyan Underwater (Swamp): diff --git a/worlds/witness/data/settings/Door_Shuffle/Complex_Doors.txt b/worlds/witness/data/settings/Door_Shuffle/Complex_Doors.txt index 7c81fd3472b4..513f1d9a71fb 100644 --- a/worlds/witness/data/settings/Door_Shuffle/Complex_Doors.txt +++ b/worlds/witness/data/settings/Door_Shuffle/Complex_Doors.txt @@ -67,7 +67,7 @@ Bunker UV Room Entry (Door) Bunker Elevator Room Entry (Door) Swamp Entry (Door) Swamp Between Bridges First Door -Swamp Platform Shortcut Door +Swamp Platform Shortcut (Door) Swamp Cyan Water Pump (Door) Swamp Between Bridges Second Door Swamp Red Water Pump (Door) @@ -92,7 +92,7 @@ Caves Pillar Door Caves Mountain Shortcut (Door) Caves Swamp Shortcut (Door) Challenge Entry (Door) -Challenge Tunnels Entry (Door) +Tunnels Entry (Door) Tunnels Theater Shortcut (Door) Tunnels Desert Shortcut (Door) Tunnels Town Shortcut (Door) From 747b48183c99becb0dac7f6554c213851b041383 Mon Sep 17 00:00:00 2001 From: black-sliver <59490463+black-sliver@users.noreply.github.com> Date: Mon, 22 Apr 2024 13:54:35 +0200 Subject: [PATCH 118/153] Setup: update cx_freeze to latest 6.x and exclude 7.x (#3194) 7.x has a breaking API change for us, so that needs to be resolved separately. --- setup.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/setup.py b/setup.py index ffb7e02fabb3..bfc16337e18b 100644 --- a/setup.py +++ b/setup.py @@ -21,7 +21,7 @@ # This is a bit jank. We need cx-Freeze to be able to run anything from this script, so install it try: - requirement = 'cx-Freeze>=6.15.10' + requirement = 'cx-Freeze>=6.15.16,<7' import pkg_resources try: pkg_resources.require(requirement) From daccb30e3d08a39729403e3b4f2da26a638b481a Mon Sep 17 00:00:00 2001 From: Fabian Dill Date: Mon, 22 Apr 2024 14:32:31 +0200 Subject: [PATCH 119/153] Factorio: fix client compatibility with Windows 7/Python 3.8 (#3196) --- worlds/factorio/requirements.txt | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/worlds/factorio/requirements.txt b/worlds/factorio/requirements.txt index c45fb771da6a..c8a60369dab6 100644 --- a/worlds/factorio/requirements.txt +++ b/worlds/factorio/requirements.txt @@ -1 +1,2 @@ -factorio-rcon-py>=2.0.1 +factorio-rcon-py>=2.1.1; python_version >= '3.9' +factorio-rcon-py==2.0.1; python_version <= '3.8' From bb16fe284ad19304d800a7d99d9d3b71626268c5 Mon Sep 17 00:00:00 2001 From: Fabian Dill Date: Tue, 23 Apr 2024 19:05:03 +0200 Subject: [PATCH 120/153] Core: make open_filename log that it's asking (#3199) --- Utils.py | 2 ++ 1 file changed, 2 insertions(+) diff --git a/Utils.py b/Utils.py index 6d4462651c89..a35dbf08156a 100644 --- a/Utils.py +++ b/Utils.py @@ -619,6 +619,8 @@ def get_fuzzy_ratio(word1: str, word2: str) -> float: def open_filename(title: str, filetypes: typing.Sequence[typing.Tuple[str, typing.Sequence[str]]], suggest: str = "") \ -> typing.Optional[str]: + logging.info(f"Opening file input dialog for {title}.") + def run(*args: str): return subprocess.run(args, capture_output=True, text=True).stdout.split("\n", 1)[0] or None From cca9778871de67a19fe339b3ade66e4d65eda429 Mon Sep 17 00:00:00 2001 From: Scipio Wright Date: Tue, 23 Apr 2024 13:58:38 -0400 Subject: [PATCH 121/153] Delete worlds/sc2wol directory (#3202) --- worlds/sc2wol/Regions.py | 0 1 file changed, 0 insertions(+), 0 deletions(-) delete mode 100644 worlds/sc2wol/Regions.py diff --git a/worlds/sc2wol/Regions.py b/worlds/sc2wol/Regions.py deleted file mode 100644 index e69de29bb2d1..000000000000 From 2f78860d8cfc8d445de425a68dc159f80e9f197f Mon Sep 17 00:00:00 2001 From: Fabian Dill Date: Wed, 24 Apr 2024 06:24:44 +0200 Subject: [PATCH 122/153] Core/SNIClient/LttP/Factorio: switch to get_settings (#3208) --- MultiServer.py | 2 +- SNIClient.py | 4 ++-- Utils.py | 2 +- worlds/alttp/Rom.py | 4 ++-- worlds/factorio/Client.py | 2 +- 5 files changed, 7 insertions(+), 7 deletions(-) diff --git a/MultiServer.py b/MultiServer.py index bfbed4620218..a92edf7660a9 100644 --- a/MultiServer.py +++ b/MultiServer.py @@ -2198,7 +2198,7 @@ async def console(ctx: Context): def parse_args() -> argparse.Namespace: parser = argparse.ArgumentParser() - defaults = Utils.get_options()["server_options"].as_dict() + defaults = Utils.get_settings()["server_options"].as_dict() parser.add_argument('multidata', nargs="?", default=defaults["multidata"]) parser.add_argument('--host', default=defaults["host"]) parser.add_argument('--port', default=defaults["port"], type=int) diff --git a/SNIClient.py b/SNIClient.py index cf4ef758ff7d..9fdddc99a3c3 100644 --- a/SNIClient.py +++ b/SNIClient.py @@ -282,7 +282,7 @@ class SNESState(enum.IntEnum): def launch_sni() -> None: - sni_path = Utils.get_options()["sni_options"]["sni_path"] + sni_path = Utils.get_settings()["sni_options"]["sni_path"] if not os.path.isdir(sni_path): sni_path = Utils.local_path(sni_path) @@ -654,7 +654,7 @@ async def game_watcher(ctx: SNIContext) -> None: async def run_game(romfile: str) -> None: auto_start = typing.cast(typing.Union[bool, str], - Utils.get_options()["sni_options"].get("snes_rom_start", True)) + Utils.get_settings()["sni_options"].get("snes_rom_start", True)) if auto_start is True: import webbrowser webbrowser.open(romfile) diff --git a/Utils.py b/Utils.py index a35dbf08156a..141b1dc7f8c6 100644 --- a/Utils.py +++ b/Utils.py @@ -201,7 +201,7 @@ def cache_path(*path: str) -> str: def output_path(*path: str) -> str: if hasattr(output_path, 'cached_path'): return os.path.join(output_path.cached_path, *path) - output_path.cached_path = user_path(get_options()["general_options"]["output_path"]) + output_path.cached_path = user_path(get_settings()["general_options"]["output_path"]) path = os.path.join(output_path.cached_path, *path) os.makedirs(os.path.dirname(path), exist_ok=True) return path diff --git a/worlds/alttp/Rom.py b/worlds/alttp/Rom.py index 08597cea0474..7c3c87683a37 100644 --- a/worlds/alttp/Rom.py +++ b/worlds/alttp/Rom.py @@ -1859,7 +1859,7 @@ def apply_oof_sfx(rom, oof: str): rom.write_bytes(0x12803A, oof_bytes) rom.write_bytes(0x12803A + len(oof_bytes), [0xEB, 0xEB]) - #Enemizer patch: prevent Enemizer from overwriting $3188 in SPC memory with an unused sound effect ("WHAT") + # Enemizer patch: prevent Enemizer from overwriting $3188 in SPC memory with an unused sound effect ("WHAT") rom.write_bytes(0x13000D, [0x00, 0x00, 0x00, 0x08]) @@ -3021,7 +3021,7 @@ def get_base_rom_bytes(file_name: str = "") -> bytes: def get_base_rom_path(file_name: str = "") -> str: - options = Utils.get_options() + options = Utils.get_settings() if not file_name: file_name = options["lttp_options"]["rom_file"] if not os.path.exists(file_name): diff --git a/worlds/factorio/Client.py b/worlds/factorio/Client.py index f612605b4c19..d245e1bb7af6 100644 --- a/worlds/factorio/Client.py +++ b/worlds/factorio/Client.py @@ -521,7 +521,7 @@ def _handle_color(self, node: JSONMessagePart): rcon_password = args.rcon_password if args.rcon_password else ''.join( random.choice(string.ascii_letters) for x in range(32)) factorio_server_logger = logging.getLogger("FactorioServer") -options = Utils.get_options() +options = Utils.get_settings() executable = options["factorio_options"]["executable"] server_settings = args.server_settings if args.server_settings \ else options["factorio_options"].get("server_settings", None) From 4756c76541e7a7e2fd6252356332191cf80c2fbb Mon Sep 17 00:00:00 2001 From: Fabian Dill Date: Wed, 24 Apr 2024 06:36:35 +0200 Subject: [PATCH 123/153] WebHost: remove JSON_AS_ASCII (#3209) --- docs/webhost configuration sample.yaml | 3 --- 1 file changed, 3 deletions(-) diff --git a/docs/webhost configuration sample.yaml b/docs/webhost configuration sample.yaml index d0556453b388..afb87b399643 100644 --- a/docs/webhost configuration sample.yaml +++ b/docs/webhost configuration sample.yaml @@ -45,9 +45,6 @@ # TODO #CACHE_TYPE: "simple" -# TODO -#JSON_AS_ASCII: false - # Host Address. This is the address encoded into the patch that will be used for client auto-connect. #HOST_ADDRESS: archipelago.gg From 4f1e6962438e1c298403b02e800684d3c317257a Mon Sep 17 00:00:00 2001 From: Aaron Wagener Date: Fri, 26 Apr 2024 14:29:01 -0500 Subject: [PATCH 124/153] The Messenger: fix import that shouldn't be relative (#3219) --- worlds/messenger/portals.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/worlds/messenger/portals.py b/worlds/messenger/portals.py index 51f51d7e379e..f5603736c3a7 100644 --- a/worlds/messenger/portals.py +++ b/worlds/messenger/portals.py @@ -2,8 +2,8 @@ from typing import List, TYPE_CHECKING from BaseClasses import CollectionState, PlandoOptions +from worlds.generic import PlandoConnection from .options import ShufflePortals -from ..generic import PlandoConnection if TYPE_CHECKING: from . import MessengerWorld From e76ba928a8b8cf43794349fd649e9d610a6c01e1 Mon Sep 17 00:00:00 2001 From: Zach Parks Date: Fri, 26 Apr 2024 22:18:12 -0400 Subject: [PATCH 125/153] WebHost: Prevent committing data packages with invalid checksums to database and prevent 500 error from invalid `zip` files. (#3206) --- WebHostLib/upload.py | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/WebHostLib/upload.py b/WebHostLib/upload.py index 884c1913f8f9..45b26b175eb3 100644 --- a/WebHostLib/upload.py +++ b/WebHostLib/upload.py @@ -63,12 +63,13 @@ def process_multidata(compressed_multidata, files={}): game_data = games_package_schema.validate(game_data) game_data = {key: value for key, value in sorted(game_data.items())} game_data["checksum"] = data_package_checksum(game_data) - game_data_package = GameDataPackage(checksum=game_data["checksum"], - data=pickle.dumps(game_data)) if original_checksum != game_data["checksum"]: raise Exception(f"Original checksum {original_checksum} != " f"calculated checksum {game_data['checksum']} " f"for game {game}.") + + game_data_package = GameDataPackage(checksum=game_data["checksum"], + data=pickle.dumps(game_data)) decompressed_multidata["datapackage"][game] = { "version": game_data.get("version", 0), "checksum": game_data["checksum"], @@ -192,6 +193,8 @@ def uploads(): res = upload_zip_to_db(zfile) except VersionException: flash(f"Could not load multidata. Wrong Version detected.") + except Exception as e: + flash(f"Could not load multidata. File may be corrupted or incompatible. ({e})") else: if res is str: return res From 9e20fa48e133fee6d9c97efd1ed1028c662e695e Mon Sep 17 00:00:00 2001 From: LiquidCat64 <74896918+LiquidCat64@users.noreply.github.com> Date: Sat, 27 Apr 2024 17:41:30 -0600 Subject: [PATCH 126/153] CV64: fix import that shouldn't be relative (#3223) --- worlds/cv64/__init__.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/worlds/cv64/__init__.py b/worlds/cv64/__init__.py index afa59b31da1b..84bf03ff27aa 100644 --- a/worlds/cv64/__init__.py +++ b/worlds/cv64/__init__.py @@ -14,7 +14,7 @@ from .regions import get_region_info from .rules import CV64Rules from .data import iname, rname, ename -from ..AutoWorld import WebWorld, World +from worlds.AutoWorld import WebWorld, World from .aesthetics import randomize_lighting, shuffle_sub_weapons, rom_empty_breakables_flags, rom_sub_weapon_flags, \ randomize_music, get_start_inventory_data, get_location_data, randomize_shop_prices, get_loading_zone_bytes, \ get_countdown_numbers From 9afe45166cda3dfb8b9ab8aa754ead6bddf3da3a Mon Sep 17 00:00:00 2001 From: Alchav <59858495+Alchav@users.noreply.github.com> Date: Sat, 27 Apr 2024 19:48:59 -0400 Subject: [PATCH 127/153] ALTTP: 0.4.6 fixes (#3215) * Fix randomizer room logic * Fix Triforce Hunt HUD always present * Fix Circle of Pots enemy byte * treasure_hunt_total for Murahdala text --- worlds/alttp/ItemPool.py | 33 +++++++++++-------- worlds/alttp/Rom.py | 20 +++++------ worlds/alttp/Rules.py | 4 +-- worlds/alttp/StateHelpers.py | 2 +- worlds/alttp/__init__.py | 3 +- worlds/alttp/test/dungeons/TestDungeon.py | 2 +- worlds/alttp/test/dungeons/TestGanonsTower.py | 12 ++++--- worlds/alttp/test/inverted/TestInverted.py | 2 +- .../TestInvertedMinor.py | 2 +- .../test/inverted_owg/TestInvertedOWG.py | 2 +- worlds/alttp/test/minor_glitches/TestMinor.py | 2 +- worlds/alttp/test/owg/TestVanillaOWG.py | 2 +- worlds/alttp/test/vanilla/TestVanilla.py | 2 +- 13 files changed, 49 insertions(+), 39 deletions(-) diff --git a/worlds/alttp/ItemPool.py b/worlds/alttp/ItemPool.py index 69ecadc79d07..125475561bb2 100644 --- a/worlds/alttp/ItemPool.py +++ b/worlds/alttp/ItemPool.py @@ -276,13 +276,14 @@ def generate_itempool(world): # set up item pool additional_triforce_pieces = 0 + treasure_hunt_total = 0 if multiworld.custom: - pool, placed_items, precollected_items, clock_mode, treasure_hunt_count = ( + pool, placed_items, precollected_items, clock_mode, treasure_hunt_required = ( make_custom_item_pool(multiworld, player)) multiworld.rupoor_cost = min(multiworld.customitemarray[67], 9999) else: - pool, placed_items, precollected_items, clock_mode, treasure_hunt_count, additional_triforce_pieces = ( - get_pool_core(multiworld, player)) + (pool, placed_items, precollected_items, clock_mode, treasure_hunt_required, treasure_hunt_total, + additional_triforce_pieces) = get_pool_core(multiworld, player) for item in precollected_items: multiworld.push_precollected(item_factory(item, world)) @@ -337,7 +338,8 @@ def generate_itempool(world): if clock_mode: world.clock_mode = clock_mode - multiworld.worlds[player].treasure_hunt_count = treasure_hunt_count % 999 + multiworld.worlds[player].treasure_hunt_required = treasure_hunt_required % 999 + multiworld.worlds[player].treasure_hunt_total = treasure_hunt_total dungeon_items = [item for item in get_dungeon_item_pool_player(world) if item.name not in multiworld.worlds[player].dungeon_local_item_names] @@ -590,7 +592,8 @@ def get_pool_core(world, player: int): placed_items = {} precollected_items = [] clock_mode: str = "" - treasure_hunt_count: int = 1 + treasure_hunt_required: int = 0 + treasure_hunt_total: int = 0 diff = difficulties[difficulty] pool.extend(diff.alwaysitems) @@ -679,20 +682,21 @@ def place_item(loc, item): if 'triforce_hunt' in goal: if world.triforce_pieces_mode[player].value == TriforcePiecesMode.option_extra: - triforce_pieces = world.triforce_pieces_available[player].value + world.triforce_pieces_extra[player].value + treasure_hunt_total = (world.triforce_pieces_available[player].value + + world.triforce_pieces_extra[player].value) elif world.triforce_pieces_mode[player].value == TriforcePiecesMode.option_percentage: percentage = float(world.triforce_pieces_percentage[player].value) / 100 - triforce_pieces = int(round(world.triforce_pieces_required[player].value * percentage, 0)) + treasure_hunt_total = int(round(world.triforce_pieces_required[player].value * percentage, 0)) else: # available - triforce_pieces = world.triforce_pieces_available[player].value + treasure_hunt_total = world.triforce_pieces_available[player].value - triforce_pieces = min(90, max(triforce_pieces, world.triforce_pieces_required[player].value)) + triforce_pieces = min(90, max(treasure_hunt_total, world.triforce_pieces_required[player].value)) pieces_in_core = min(extraitems, triforce_pieces) additional_pieces_to_place = triforce_pieces - pieces_in_core pool.extend(["Triforce Piece"] * pieces_in_core) extraitems -= pieces_in_core - treasure_hunt_count = world.triforce_pieces_required[player].value + treasure_hunt_required = world.triforce_pieces_required[player].value for extra in diff.extras: if extraitems >= len(extra): @@ -733,7 +737,7 @@ def place_item(loc, item): place_item(key_location, "Small Key (Universal)") pool = pool[:-3] - return (pool, placed_items, precollected_items, clock_mode, treasure_hunt_count, + return (pool, placed_items, precollected_items, clock_mode, treasure_hunt_required, treasure_hunt_total, additional_pieces_to_place) @@ -749,7 +753,8 @@ def make_custom_item_pool(world, player): placed_items = {} precollected_items = [] clock_mode: str = "" - treasure_hunt_count: int = 1 + treasure_hunt_required: int = 0 + treasure_hunt_total: int = 0 def place_item(loc, item): assert loc not in placed_items, "cannot place item twice" @@ -844,7 +849,7 @@ def place_item(loc, item): if "triforce" in world.goal[player]: pool.extend(["Triforce Piece"] * world.triforce_pieces_available[player]) itemtotal += world.triforce_pieces_available[player] - treasure_hunt_count = world.triforce_pieces_required[player] + treasure_hunt_required = world.triforce_pieces_required[player] if timer in ['display', 'timed', 'timed_countdown']: clock_mode = 'countdown' if timer == 'timed_countdown' else 'stopwatch' @@ -889,4 +894,4 @@ def place_item(loc, item): pool.extend(['Nothing'] * (total_items_to_place - itemtotal)) logging.warning(f"Pool was filled up with {total_items_to_place - itemtotal} Nothing's for player {player}") - return (pool, placed_items, precollected_items, clock_mode, treasure_hunt_count) + return (pool, placed_items, precollected_items, clock_mode, treasure_hunt_required) diff --git a/worlds/alttp/Rom.py b/worlds/alttp/Rom.py index 7c3c87683a37..05460e0f9b8c 100644 --- a/worlds/alttp/Rom.py +++ b/worlds/alttp/Rom.py @@ -433,7 +433,7 @@ def patch_enemizer(world, rom: LocalRom, enemizercli, output_directory): if multiworld.key_drop_shuffle[player]: key_drop_enemies = { 0x4DA20, 0x4DA5C, 0x4DB7F, 0x4DD73, 0x4DDC3, 0x4DE07, 0x4E201, - 0x4E20A, 0x4E326, 0x4E4F7, 0x4E686, 0x4E70C, 0x4E7C8, 0x4E7FA + 0x4E20A, 0x4E326, 0x4E4F7, 0x4E687, 0x4E70C, 0x4E7C8, 0x4E7FA } for enemy in key_drop_enemies: if rom.read_byte(enemy) == 0x12: @@ -1269,7 +1269,7 @@ def chunk(l, n): rom.write_int32(0x18020C, 0) # starting time (in frames, sint32) # set up goals for treasure hunt - rom.write_int16(0x180163, local_world.treasure_hunt_count) + rom.write_int16(0x180163, local_world.treasure_hunt_required) rom.write_bytes(0x180165, [0x0E, 0x28]) # Triforce Piece Sprite rom.write_byte(0x180194, 1) # Must turn in triforced pieces (instant win not enabled) @@ -2482,16 +2482,16 @@ def hint_text(dest, ped_hint=False): tt['sign_ganon'] = 'Go find the Triforce pieces with your friends... Ganon is invincible!' else: tt['sign_ganon'] = 'Go find the Triforce pieces... Ganon is invincible!' - if w.treasure_hunt_count > 1: + if w.treasure_hunt_required > 1: tt['murahdahla'] = "Hello @. I\nam Murahdahla, brother of\nSahasrahla and Aginah. Behold the power of\n" \ "invisibility.\n\n\n\n… … …\n\nWait! you can see me? I knew I should have\n" \ "hidden in a hollow tree. If you bring\n%d Triforce pieces out of %d, I can reassemble it." % \ - (w.treasure_hunt_count, world.triforce_pieces_available[player]) + (w.treasure_hunt_required, w.treasure_hunt_total) else: tt['murahdahla'] = "Hello @. I\nam Murahdahla, brother of\nSahasrahla and Aginah. Behold the power of\n" \ "invisibility.\n\n\n\n… … …\n\nWait! you can see me? I knew I should have\n" \ "hidden in a hollow tree. If you bring\n%d Triforce piece out of %d, I can reassemble it." % \ - (w.treasure_hunt_count, world.triforce_pieces_available[player]) + (w.treasure_hunt_required, w.treasure_hunt_total) elif world.goal[player] in ['pedestal']: tt['ganon_fall_in_alt'] = 'Why are you even here?\n You can\'t even hurt me! Your goal is at the pedestal.' tt['ganon_phase_3_alt'] = 'Seriously? Go Away, I will not Die.' @@ -2500,20 +2500,20 @@ def hint_text(dest, ped_hint=False): tt['ganon_fall_in'] = Ganon1_texts[local_random.randint(0, len(Ganon1_texts) - 1)] tt['ganon_fall_in_alt'] = 'You cannot defeat me until you finish your goal!' tt['ganon_phase_3_alt'] = 'Got wax in\nyour ears?\nI can not die!' - if w.treasure_hunt_count > 1: + if w.treasure_hunt_required > 1: if world.goal[player] == 'ganon_triforce_hunt' and world.players > 1: tt['sign_ganon'] = 'You need to find %d Triforce pieces out of %d with your friends to defeat Ganon.' % \ - (w.treasure_hunt_count, world.triforce_pieces_available[player]) + (w.treasure_hunt_required, w.treasure_hunt_total) elif world.goal[player] in ['ganon_triforce_hunt', 'local_ganon_triforce_hunt']: tt['sign_ganon'] = 'You need to find %d Triforce pieces out of %d to defeat Ganon.' % \ - (w.treasure_hunt_count, world.triforce_pieces_available[player]) + (w.treasure_hunt_required, w.treasure_hunt_total) else: if world.goal[player] == 'ganon_triforce_hunt' and world.players > 1: tt['sign_ganon'] = 'You need to find %d Triforce piece out of %d with your friends to defeat Ganon.' % \ - (w.treasure_hunt_count, world.triforce_pieces_available[player]) + (w.treasure_hunt_required, w.treasure_hunt_total) elif world.goal[player] in ['ganon_triforce_hunt', 'local_ganon_triforce_hunt']: tt['sign_ganon'] = 'You need to find %d Triforce piece out of %d to defeat Ganon.' % \ - (w.treasure_hunt_count, world.triforce_pieces_available[player]) + (w.treasure_hunt_required, w.treasure_hunt_total) tt['kakariko_tavern_fisherman'] = TavernMan_texts[local_random.randint(0, len(TavernMan_texts) - 1)] diff --git a/worlds/alttp/Rules.py b/worlds/alttp/Rules.py index 5e4635fa2754..e13f0914f93b 100644 --- a/worlds/alttp/Rules.py +++ b/worlds/alttp/Rules.py @@ -554,8 +554,8 @@ def global_rules(multiworld: MultiWorld, player: int): set_rule(multiworld.get_location('Ganons Tower - Firesnake Room', player), lambda state: state._lttp_has_key('Small Key (Ganons Tower)', player, 7) or ((item_name_in_location_names(state, 'Big Key (Ganons Tower)', player, zip(randomizer_room_chests, [player] * len(randomizer_room_chests))) or item_name_in_location_names(state, 'Small Key (Ganons Tower)', player, [('Ganons Tower - Firesnake Room', player)])) and state._lttp_has_key('Small Key (Ganons Tower)', player, 5))) for location in randomizer_room_chests: - set_rule(multiworld.get_location(location, player), lambda state: state._lttp_has_key('Small Key (Ganons Tower)', player, 8) or ( - item_name_in_location_names(state, 'Big Key (Ganons Tower)', player, zip(randomizer_room_chests, [player] * len(randomizer_room_chests))) and state._lttp_has_key('Small Key (Ganons Tower)', player, 6))) + set_rule(multiworld.get_location(location, player), lambda state: can_use_bombs(state, player) and (state._lttp_has_key('Small Key (Ganons Tower)', player, 8) or ( + item_name_in_location_names(state, 'Big Key (Ganons Tower)', player, zip(randomizer_room_chests, [player] * len(randomizer_room_chests))) and state._lttp_has_key('Small Key (Ganons Tower)', player, 6)))) # Once again it is possible to need more than 7 keys... set_rule(multiworld.get_entrance('Ganons Tower (Tile Room) Key Door', player), lambda state: state.has('Fire Rod', player) and (state._lttp_has_key('Small Key (Ganons Tower)', player, 7) or ( diff --git a/worlds/alttp/StateHelpers.py b/worlds/alttp/StateHelpers.py index fe3a43ee0f55..964a77fefbaf 100644 --- a/worlds/alttp/StateHelpers.py +++ b/worlds/alttp/StateHelpers.py @@ -30,7 +30,7 @@ def can_shoot_arrows(state: CollectionState, player: int) -> bool: def has_triforce_pieces(state: CollectionState, player: int) -> bool: - count = state.multiworld.worlds[player].treasure_hunt_count + count = state.multiworld.worlds[player].treasure_hunt_required return state.count('Triforce Piece', player) + state.count('Power Star', player) >= count diff --git a/worlds/alttp/__init__.py b/worlds/alttp/__init__.py index f4a374ce0201..ae3dfe9e3b1a 100644 --- a/worlds/alttp/__init__.py +++ b/worlds/alttp/__init__.py @@ -261,7 +261,8 @@ def enemizer_path(self) -> str: fix_fake_world: bool = True clock_mode: str = "" - treasure_hunt_count: int = 1 + treasure_hunt_required: int = 0 + treasure_hunt_total: int = 0 def __init__(self, *args, **kwargs): self.dungeon_local_item_names = set() diff --git a/worlds/alttp/test/dungeons/TestDungeon.py b/worlds/alttp/test/dungeons/TestDungeon.py index a31ddd68b2e1..91fc462c4ecc 100644 --- a/worlds/alttp/test/dungeons/TestDungeon.py +++ b/worlds/alttp/test/dungeons/TestDungeon.py @@ -15,7 +15,7 @@ def setUp(self): self.remove_exits = [] # Block dungeon exits self.multiworld.worlds[1].difficulty_requirements = difficulties['normal'] self.multiworld.bombless_start[1].value = True - self.multiworld.shuffle_capacity_upgrades[1].value = True + self.multiworld.shuffle_capacity_upgrades[1].value = 2 create_regions(self.multiworld, 1) self.multiworld.worlds[1].create_dungeons() create_shops(self.multiworld, 1) diff --git a/worlds/alttp/test/dungeons/TestGanonsTower.py b/worlds/alttp/test/dungeons/TestGanonsTower.py index 1e70f580de4e..08274d0fe7d9 100644 --- a/worlds/alttp/test/dungeons/TestGanonsTower.py +++ b/worlds/alttp/test/dungeons/TestGanonsTower.py @@ -33,22 +33,26 @@ def testGanonsTower(self): ["Ganons Tower - Randomizer Room - Top Left", False, []], ["Ganons Tower - Randomizer Room - Top Left", False, [], ['Hammer']], ["Ganons Tower - Randomizer Room - Top Left", False, [], ['Hookshot']], - ["Ganons Tower - Randomizer Room - Top Left", True, ['Small Key (Ganons Tower)', 'Small Key (Ganons Tower)', 'Small Key (Ganons Tower)', 'Small Key (Ganons Tower)', 'Small Key (Ganons Tower)', 'Small Key (Ganons Tower)', 'Small Key (Ganons Tower)', 'Small Key (Ganons Tower)', 'Hookshot', 'Hammer']], + ["Ganons Tower - Randomizer Room - Top Left", False, [], ['Bomb Upgrade (50)']], + ["Ganons Tower - Randomizer Room - Top Left", True, ['Small Key (Ganons Tower)', 'Small Key (Ganons Tower)', 'Small Key (Ganons Tower)', 'Small Key (Ganons Tower)', 'Small Key (Ganons Tower)', 'Small Key (Ganons Tower)', 'Small Key (Ganons Tower)', 'Small Key (Ganons Tower)', 'Hookshot', 'Hammer', 'Bomb Upgrade (50)']], ["Ganons Tower - Randomizer Room - Top Right", False, []], ["Ganons Tower - Randomizer Room - Top Right", False, [], ['Hammer']], ["Ganons Tower - Randomizer Room - Top Right", False, [], ['Hookshot']], - ["Ganons Tower - Randomizer Room - Top Right", True, ['Small Key (Ganons Tower)', 'Small Key (Ganons Tower)', 'Small Key (Ganons Tower)', 'Small Key (Ganons Tower)', 'Small Key (Ganons Tower)', 'Small Key (Ganons Tower)', 'Small Key (Ganons Tower)', 'Small Key (Ganons Tower)', 'Hookshot', 'Hammer']], + ["Ganons Tower - Randomizer Room - Top Right", False, [], ['Bomb Upgrade (50)']], + ["Ganons Tower - Randomizer Room - Top Right", True, ['Small Key (Ganons Tower)', 'Small Key (Ganons Tower)', 'Small Key (Ganons Tower)', 'Small Key (Ganons Tower)', 'Small Key (Ganons Tower)', 'Small Key (Ganons Tower)', 'Small Key (Ganons Tower)', 'Small Key (Ganons Tower)', 'Hookshot', 'Hammer', 'Bomb Upgrade (50)']], ["Ganons Tower - Randomizer Room - Bottom Left", False, []], ["Ganons Tower - Randomizer Room - Bottom Left", False, [], ['Hammer']], ["Ganons Tower - Randomizer Room - Bottom Left", False, [], ['Hookshot']], - ["Ganons Tower - Randomizer Room - Bottom Left", True, ['Small Key (Ganons Tower)', 'Small Key (Ganons Tower)', 'Small Key (Ganons Tower)', 'Small Key (Ganons Tower)', 'Small Key (Ganons Tower)', 'Small Key (Ganons Tower)', 'Small Key (Ganons Tower)', 'Small Key (Ganons Tower)', 'Hookshot', 'Hammer']], + ["Ganons Tower - Randomizer Room - Bottom Left", False, [], ['Bomb Upgrade (50)']], + ["Ganons Tower - Randomizer Room - Bottom Left", True, ['Small Key (Ganons Tower)', 'Small Key (Ganons Tower)', 'Small Key (Ganons Tower)', 'Small Key (Ganons Tower)', 'Small Key (Ganons Tower)', 'Small Key (Ganons Tower)', 'Small Key (Ganons Tower)', 'Small Key (Ganons Tower)', 'Hookshot', 'Hammer', 'Bomb Upgrade (50)']], ["Ganons Tower - Randomizer Room - Bottom Right", False, []], ["Ganons Tower - Randomizer Room - Bottom Right", False, [], ['Hammer']], ["Ganons Tower - Randomizer Room - Bottom Right", False, [], ['Hookshot']], - ["Ganons Tower - Randomizer Room - Bottom Right", True, ['Small Key (Ganons Tower)', 'Small Key (Ganons Tower)', 'Small Key (Ganons Tower)', 'Small Key (Ganons Tower)', 'Small Key (Ganons Tower)', 'Small Key (Ganons Tower)', 'Small Key (Ganons Tower)', 'Small Key (Ganons Tower)', 'Hookshot', 'Hammer']], + ["Ganons Tower - Randomizer Room - Bottom Right", False, [], ['Bomb Upgrade (50)']], + ["Ganons Tower - Randomizer Room - Bottom Right", True, ['Small Key (Ganons Tower)', 'Small Key (Ganons Tower)', 'Small Key (Ganons Tower)', 'Small Key (Ganons Tower)', 'Small Key (Ganons Tower)', 'Small Key (Ganons Tower)', 'Small Key (Ganons Tower)', 'Small Key (Ganons Tower)', 'Hookshot', 'Hammer', 'Bomb Upgrade (50)']], ["Ganons Tower - Firesnake Room", False, []], ["Ganons Tower - Firesnake Room", False, [], ['Hammer']], diff --git a/worlds/alttp/test/inverted/TestInverted.py b/worlds/alttp/test/inverted/TestInverted.py index 59a3d7f5f4fa..0a2aa7a18653 100644 --- a/worlds/alttp/test/inverted/TestInverted.py +++ b/worlds/alttp/test/inverted/TestInverted.py @@ -16,7 +16,7 @@ def setUp(self): self.multiworld.worlds[1].difficulty_requirements = difficulties['normal'] self.multiworld.mode[1].value = 2 self.multiworld.bombless_start[1].value = True - self.multiworld.shuffle_capacity_upgrades[1].value = True + self.multiworld.shuffle_capacity_upgrades[1].value = 2 create_inverted_regions(self.multiworld, 1) self.world.create_dungeons() create_shops(self.multiworld, 1) diff --git a/worlds/alttp/test/inverted_minor_glitches/TestInvertedMinor.py b/worlds/alttp/test/inverted_minor_glitches/TestInvertedMinor.py index 029de39bc232..a8fa5c808c3b 100644 --- a/worlds/alttp/test/inverted_minor_glitches/TestInvertedMinor.py +++ b/worlds/alttp/test/inverted_minor_glitches/TestInvertedMinor.py @@ -17,7 +17,7 @@ def setUp(self): self.multiworld.mode[1].value = 2 self.multiworld.glitches_required[1] = GlitchesRequired.from_any("minor_glitches") self.multiworld.bombless_start[1].value = True - self.multiworld.shuffle_capacity_upgrades[1].value = True + self.multiworld.shuffle_capacity_upgrades[1].value = 2 self.multiworld.worlds[1].difficulty_requirements = difficulties['normal'] create_inverted_regions(self.multiworld, 1) self.world.create_dungeons() diff --git a/worlds/alttp/test/inverted_owg/TestInvertedOWG.py b/worlds/alttp/test/inverted_owg/TestInvertedOWG.py index 86afae3e2a67..bbdf0f792444 100644 --- a/worlds/alttp/test/inverted_owg/TestInvertedOWG.py +++ b/worlds/alttp/test/inverted_owg/TestInvertedOWG.py @@ -17,7 +17,7 @@ def setUp(self): self.multiworld.glitches_required[1] = GlitchesRequired.from_any("overworld_glitches") self.multiworld.mode[1].value = 2 self.multiworld.bombless_start[1].value = True - self.multiworld.shuffle_capacity_upgrades[1].value = True + self.multiworld.shuffle_capacity_upgrades[1].value = 2 self.multiworld.worlds[1].difficulty_requirements = difficulties['normal'] create_inverted_regions(self.multiworld, 1) self.world.create_dungeons() diff --git a/worlds/alttp/test/minor_glitches/TestMinor.py b/worlds/alttp/test/minor_glitches/TestMinor.py index 55fef61ebf99..8432028bf007 100644 --- a/worlds/alttp/test/minor_glitches/TestMinor.py +++ b/worlds/alttp/test/minor_glitches/TestMinor.py @@ -13,7 +13,7 @@ def setUp(self): self.world_setup() self.multiworld.glitches_required[1] = GlitchesRequired.from_any("minor_glitches") self.multiworld.bombless_start[1].value = True - self.multiworld.shuffle_capacity_upgrades[1].value = True + self.multiworld.shuffle_capacity_upgrades[1].value = 2 self.multiworld.worlds[1].difficulty_requirements = difficulties['normal'] self.world.er_seed = 0 self.world.create_regions() diff --git a/worlds/alttp/test/owg/TestVanillaOWG.py b/worlds/alttp/test/owg/TestVanillaOWG.py index 61b528f6fb91..67156eb97275 100644 --- a/worlds/alttp/test/owg/TestVanillaOWG.py +++ b/worlds/alttp/test/owg/TestVanillaOWG.py @@ -14,7 +14,7 @@ def setUp(self): self.multiworld.worlds[1].difficulty_requirements = difficulties['normal'] self.multiworld.glitches_required[1] = GlitchesRequired.from_any("overworld_glitches") self.multiworld.bombless_start[1].value = True - self.multiworld.shuffle_capacity_upgrades[1].value = True + self.multiworld.shuffle_capacity_upgrades[1].value = 2 self.multiworld.worlds[1].er_seed = 0 self.multiworld.worlds[1].create_regions() self.multiworld.worlds[1].create_items() diff --git a/worlds/alttp/test/vanilla/TestVanilla.py b/worlds/alttp/test/vanilla/TestVanilla.py index 496b2ba0f9ac..7eebc349d43f 100644 --- a/worlds/alttp/test/vanilla/TestVanilla.py +++ b/worlds/alttp/test/vanilla/TestVanilla.py @@ -13,7 +13,7 @@ def setUp(self): self.multiworld.glitches_required[1] = GlitchesRequired.from_any("no_glitches") self.multiworld.worlds[1].difficulty_requirements = difficulties['normal'] self.multiworld.bombless_start[1].value = True - self.multiworld.shuffle_capacity_upgrades[1].value = True + self.multiworld.shuffle_capacity_upgrades[1].value = 2 self.multiworld.worlds[1].er_seed = 0 self.multiworld.worlds[1].create_regions() self.multiworld.worlds[1].create_items() From 9cdc90513be72c2ff8ad2924207de9454c5036c3 Mon Sep 17 00:00:00 2001 From: t3hf1gm3nt <59876300+t3hf1gm3nt@users.noreply.github.com> Date: Sat, 27 Apr 2024 19:49:59 -0400 Subject: [PATCH 128/153] [TLOZ]: Dark Rooms and Level 8 Logic Fixes (#3222) Properly name the Book to Book of Magic in Rules.py so you can actually possibly be expected to use Magical Rod plus Book of Magic to get through dark rooms. No wonder we tend to see candles so early oops. Also adding a rule that you need candles for access to Level 8 so you aren't required to time a Rod+Book shot against a moblin to burn the bush. Might make this a logic trick or something later. --- worlds/tloz/Rules.py | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/worlds/tloz/Rules.py b/worlds/tloz/Rules.py index f8b21bff712c..ceb1041ba576 100644 --- a/worlds/tloz/Rules.py +++ b/worlds/tloz/Rules.py @@ -49,7 +49,7 @@ def set_rules(tloz_world: "TLoZWorld"): for location in level.locations: add_rule(world.get_location(location.name, player), lambda state: state.has_group("candles", player) - or (state.has("Magical Rod", player) and state.has("Book", 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:]: @@ -84,6 +84,11 @@ def set_rules(tloz_world: "TLoZWorld"): add_rule(world.get_location(location, player), 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), + lambda state: state.has_group("candles", player)) + add_rule(world.get_location("Level 8 Item (Magical Key)", player), lambda state: state.has("Bow", player) and state.has_group("arrows", player)) if options.ExpandedPool: From fc4e6adff51979bb2cbc7ca6f3aa28d752420dde Mon Sep 17 00:00:00 2001 From: Doug Hoskisson Date: Sun, 28 Apr 2024 22:26:30 -0700 Subject: [PATCH 129/153] Core: some `CommonContext` typing (#3227) --- CommonClient.py | 2 ++ 1 file changed, 2 insertions(+) diff --git a/CommonClient.py b/CommonClient.py index 88a2c512d53b..63cac098e22a 100644 --- a/CommonClient.py +++ b/CommonClient.py @@ -207,6 +207,8 @@ class CommonContext: finished_game: bool ready: bool + team: typing.Optional[int] + slot: typing.Optional[int] auth: typing.Optional[str] seed_name: typing.Optional[str] From 487a067d102baa48cac748c4310b688935e981df Mon Sep 17 00:00:00 2001 From: Star Rauchenberger Date: Mon, 29 Apr 2024 13:38:29 -0500 Subject: [PATCH 130/153] Lingo: Fix world load on frozen 3.8 (#3220) * Lingo: Fix world load on frozen 3.8 * Fixed absolute imports in unit test * Made unpickling safer --- worlds/lingo/options.py | 2 +- worlds/lingo/static_logic.py | 13 ++++++++----- worlds/lingo/test/TestDatafile.py | 4 ++-- 3 files changed, 11 insertions(+), 8 deletions(-) diff --git a/worlds/lingo/options.py b/worlds/lingo/options.py index 05fb4ed977e0..65f27269f2c8 100644 --- a/worlds/lingo/options.py +++ b/worlds/lingo/options.py @@ -3,7 +3,7 @@ from schema import And, Schema from Options import Toggle, Choice, DefaultOnToggle, Range, PerGameCommonOptions, StartInventoryPool, OptionDict -from worlds.lingo.items import TRAP_ITEMS +from .items import TRAP_ITEMS class ShuffleDoors(Choice): diff --git a/worlds/lingo/static_logic.py b/worlds/lingo/static_logic.py index c7ee00102ca5..ff820dd0cb11 100644 --- a/worlds/lingo/static_logic.py +++ b/worlds/lingo/static_logic.py @@ -78,13 +78,16 @@ def get_progressive_item_id(name: str): def load_static_data_from_file(): global PAINTING_ENTRANCES, PAINTING_EXITS + from . import datatypes + from Utils import safe_builtins + class RenameUnpickler(pickle.Unpickler): def find_class(self, module, name): - renamed_module = module - if module == "datatypes": - renamed_module = "worlds.lingo.datatypes" - - return super(RenameUnpickler, self).find_class(renamed_module, name) + if module in ("worlds.lingo.datatypes", "datatypes"): + return getattr(datatypes, name) + elif module == "builtins" and name in safe_builtins: + return getattr(safe_builtins, name) + raise pickle.UnpicklingError(f"global '{module}.{name}' is forbidden") file = pkgutil.get_data(__name__, os.path.join("data", "generated.dat")) pickdata = RenameUnpickler(BytesIO(file)).load() diff --git a/worlds/lingo/test/TestDatafile.py b/worlds/lingo/test/TestDatafile.py index 9f4e9da05f65..60acb3e85e96 100644 --- a/worlds/lingo/test/TestDatafile.py +++ b/worlds/lingo/test/TestDatafile.py @@ -1,8 +1,8 @@ import os import unittest -from worlds.lingo.static_logic import HASHES -from worlds.lingo.utils.pickle_static_data import hash_file +from ..static_logic import HASHES +from ..utils.pickle_static_data import hash_file class TestDatafile(unittest.TestCase): From 0ed0de3daa90d3aeae4bcef8083f51185b9add7c Mon Sep 17 00:00:00 2001 From: black-sliver <59490463+black-sliver@users.noreply.github.com> Date: Wed, 1 May 2024 01:48:32 +0200 Subject: [PATCH 131/153] Setup: update cx_freeze to 7.x (#3195) --- setup.py | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/setup.py b/setup.py index bfc16337e18b..3e128eec7e55 100644 --- a/setup.py +++ b/setup.py @@ -21,7 +21,7 @@ # This is a bit jank. We need cx-Freeze to be able to run anything from this script, so install it try: - requirement = 'cx-Freeze>=6.15.16,<7' + requirement = 'cx-Freeze>=7.0.0' import pkg_resources try: pkg_resources.require(requirement) @@ -228,8 +228,8 @@ def finalize_options(self): # Override cx_Freeze's build_exe command for pre and post build steps -class BuildExeCommand(cx_Freeze.command.build_exe.BuildEXE): - user_options = cx_Freeze.command.build_exe.BuildEXE.user_options + [ +class BuildExeCommand(cx_Freeze.command.build_exe.build_exe): + user_options = cx_Freeze.command.build_exe.build_exe.user_options + [ ('yes', 'y', 'Answer "yes" to all questions.'), ('extra-data=', None, 'Additional files to add.'), ] From 6f8b8fc9c9bd371f2a70f9c83b9d434c3fb945ba Mon Sep 17 00:00:00 2001 From: Aaron Wagener Date: Thu, 2 May 2024 02:22:50 -0500 Subject: [PATCH 132/153] Options: Add an OptionError to specify bad options caused the failure (#2343) * Options: Add an OptionError to specify bad options caused the failure * inherit from ValueError instead of RuntimeError since this error should be thrown via bad input --------- Co-authored-by: NewSoupVi <57900059+NewSoupVi@users.noreply.github.com> --- Generate.py | 4 ++-- Options.py | 4 ++++ 2 files changed, 6 insertions(+), 2 deletions(-) diff --git a/Generate.py b/Generate.py index 8c649d76b770..d215f39d9dc9 100644 --- a/Generate.py +++ b/Generate.py @@ -353,7 +353,7 @@ def roll_meta_option(option_key, game: str, category_dict: Dict) -> Any: if options[option_key].supports_weighting: return get_choice(option_key, category_dict) return category_dict[option_key] - raise Exception(f"Error generating meta option {option_key} for {game}.") + raise Options.OptionError(f"Error generating meta option {option_key} for {game}.") def roll_linked_options(weights: dict) -> dict: @@ -417,7 +417,7 @@ def handle_option(ret: argparse.Namespace, game_weights: dict, option_key: str, player_option = option.from_any(get_choice(option_key, game_weights)) setattr(ret, option_key, player_option) except Exception as e: - raise Exception(f"Error generating option {option_key} in {ret.game}") from e + raise Options.OptionError(f"Error generating option {option_key} in {ret.game}") from e else: player_option.verify(AutoWorldRegister.world_types[ret.game], ret.name, plando_options) else: diff --git a/Options.py b/Options.py index fc6335899d02..1eb0afeeeecb 100644 --- a/Options.py +++ b/Options.py @@ -21,6 +21,10 @@ import pathlib +class OptionError(ValueError): + pass + + class Visibility(enum.IntFlag): none = 0b0000 template = 0b0001 From ea6235e0d947740fc21d9295861d327dabc2c14c Mon Sep 17 00:00:00 2001 From: Emily <35015090+EmilyV99@users.noreply.github.com> Date: Thu, 2 May 2024 03:38:49 -0400 Subject: [PATCH 133/153] Core: Improve join/leave messages, add "HintGame" tag (#2859) * Add better "verbs" on joining msg, and improve leaving msgs * Add 'HintGame' tag, for projects like BKSudoku/APSudoku/HintMachine * data in one place instead of 3 * Clean up 'ignore_game' loop to use any() instead --------- Co-authored-by: beauxq --- MultiServer.py | 32 ++++++++++++++++++++++++++++---- 1 file changed, 28 insertions(+), 4 deletions(-) diff --git a/MultiServer.py b/MultiServer.py index a92edf7660a9..9ee6a8032c1f 100644 --- a/MultiServer.py +++ b/MultiServer.py @@ -803,14 +803,25 @@ async def on_client_disconnected(ctx: Context, client: Client): await on_client_left(ctx, client) +_non_game_messages = {"HintGame": "hinting", "Tracker": "tracking", "TextOnly": "viewing"} +""" { tag: ui_message } """ + + async def on_client_joined(ctx: Context, client: Client): if ctx.client_game_state[client.team, client.slot] == ClientStatus.CLIENT_UNKNOWN: update_client_status(ctx, client, ClientStatus.CLIENT_CONNECTED) version_str = '.'.join(str(x) for x in client.version) - verb = "tracking" if "Tracker" in client.tags else "playing" + + for tag, verb in _non_game_messages.items(): + if tag in client.tags: + final_verb = verb + break + else: + final_verb = "playing" + ctx.broadcast_text_all( f"{ctx.get_aliased_name(client.team, client.slot)} (Team #{client.team + 1}) " - f"{verb} {ctx.games[client.slot]} has joined. " + f"{final_verb} {ctx.games[client.slot]} has joined. " f"Client({version_str}), {client.tags}.", {"type": "Join", "team": client.team, "slot": client.slot, "tags": client.tags}) ctx.notify_client(client, "Now that you are connected, " @@ -825,8 +836,19 @@ async def on_client_left(ctx: Context, client: Client): if len(ctx.clients[client.team][client.slot]) < 1: update_client_status(ctx, client, ClientStatus.CLIENT_UNKNOWN) ctx.client_connection_timers[client.team, client.slot] = datetime.datetime.now(datetime.timezone.utc) + + version_str = '.'.join(str(x) for x in client.version) + + for tag, verb in _non_game_messages.items(): + if tag in client.tags: + final_verb = f"stopped {verb}" + break + else: + final_verb = "left" + ctx.broadcast_text_all( - "%s (Team #%d) has left the game" % (ctx.get_aliased_name(client.team, client.slot), client.team + 1), + f"{ctx.get_aliased_name(client.team, client.slot)} (Team #{client.team + 1}) has {final_verb} the game. " + f"Client({version_str}), {client.tags}.", {"type": "Part", "team": client.team, "slot": client.slot}) @@ -1631,7 +1653,9 @@ async def process_client_cmd(ctx: Context, client: Client, args: dict): else: team, slot = ctx.connect_names[args['name']] game = ctx.games[slot] - ignore_game = ("TextOnly" in args["tags"] or "Tracker" in args["tags"]) and not args.get("game") + + ignore_game = not args.get("game") and any(tag in _non_game_messages for tag in args["tags"]) + if not ignore_game and args['game'] != game: errors.add('InvalidGame') minver = min_client_version if ignore_game else ctx.minimum_client_versions[slot] From fc571ba356f817d3788f27054ae56328d0a1022e Mon Sep 17 00:00:00 2001 From: Star Rauchenberger Date: Thu, 2 May 2024 02:52:16 -0500 Subject: [PATCH 134/153] Lingo: Expand sphere 1 under restrictive conditions (#3190) --- worlds/lingo/locations.py | 4 ++++ worlds/lingo/player_logic.py | 5 ++++- 2 files changed, 8 insertions(+), 1 deletion(-) diff --git a/worlds/lingo/locations.py b/worlds/lingo/locations.py index a6e53e761d49..5ffedee36799 100644 --- a/worlds/lingo/locations.py +++ b/worlds/lingo/locations.py @@ -10,6 +10,7 @@ class LocationClassification(Flag): normal = auto() reduced = auto() insanity = auto() + small_sphere_one = auto() class LocationData(NamedTuple): @@ -47,6 +48,9 @@ def load_location_data(): if not panel.exclude_reduce: classification |= LocationClassification.reduced + if room_name == "Starting Room": + classification |= LocationClassification.small_sphere_one + ALL_LOCATION_TABLE[location_name] = \ LocationData(get_panel_location_id(room_name, panel_name), room_name, [RoomAndPanel(None, panel_name)], classification) diff --git a/worlds/lingo/player_logic.py b/worlds/lingo/player_logic.py index 96e9869d3731..f7bf1ac99bdd 100644 --- a/worlds/lingo/player_logic.py +++ b/worlds/lingo/player_logic.py @@ -236,9 +236,12 @@ def __init__(self, world: "LingoWorld"): elif location_checks == LocationChecks.option_insanity: location_classification = LocationClassification.insanity + if door_shuffle != ShuffleDoors.option_none and not early_color_hallways: + location_classification |= LocationClassification.small_sphere_one + for location_name, location_data in ALL_LOCATION_TABLE.items(): if location_name != self.victory_condition: - if location_classification not in location_data.classification: + if not (location_classification & location_data.classification): continue self.add_location(location_data.room, location_name, location_data.code, location_data.panels, world) From 07d9d6165e4906c37842dd5da99be9ce693bca41 Mon Sep 17 00:00:00 2001 From: Aaron Wagener Date: Thu, 2 May 2024 03:01:59 -0500 Subject: [PATCH 135/153] Tests: Clean up some of the fill test helpers a bit (#2935) * Tests: Clean up some of the fill test helpers a bit * fix some formatting --------- Co-authored-by: NewSoupVi <57900059+NewSoupVi@users.noreply.github.com> --- test/general/__init__.py | 66 ++++++++++++++++-- test/general/test_fill.py | 138 +++++++++++++------------------------- 2 files changed, 107 insertions(+), 97 deletions(-) diff --git a/test/general/__init__.py b/test/general/__init__.py index fe890e0b340b..1d4fc80c3e55 100644 --- a/test/general/__init__.py +++ b/test/general/__init__.py @@ -1,7 +1,7 @@ from argparse import Namespace from typing import List, Optional, Tuple, Type, Union -from BaseClasses import CollectionState, MultiWorld +from BaseClasses import CollectionState, Item, ItemClassification, Location, MultiWorld, Region from worlds.AutoWorld import World, call_all gen_steps = ("generate_early", "create_regions", "create_items", "set_rules", "generate_basic", "pre_fill") @@ -17,19 +17,21 @@ def setup_solo_multiworld( :param steps: The gen steps that should be called on the generated multiworld before returning. Default calls steps through pre_fill :param seed: The seed to be used when creating this multiworld + :return: The generated multiworld """ return setup_multiworld(world_type, steps, seed) def setup_multiworld(worlds: Union[List[Type[World]], Type[World]], steps: Tuple[str, ...] = gen_steps, - seed: Optional[int] = None) -> MultiWorld: + seed: Optional[int] = None) -> MultiWorld: """ Creates a multiworld with a player for each provided world type, allowing duplicates, setting default options, and calling the provided gen steps. - :param worlds: type/s of worlds to generate a multiworld for - :param steps: gen steps that should be called before returning. Default calls through pre_fill + :param worlds: Type/s of worlds to generate a multiworld for + :param steps: Gen steps that should be called before returning. Default calls through pre_fill :param seed: The seed to be used when creating this multiworld + :return: The generated multiworld """ if not isinstance(worlds, list): worlds = [worlds] @@ -49,3 +51,59 @@ def setup_multiworld(worlds: Union[List[Type[World]], Type[World]], steps: Tuple for step in steps: call_all(multiworld, step) return multiworld + + +class TestWorld(World): + game = f"Test Game" + item_name_to_id = {} + location_name_to_id = {} + hidden = True + + +def generate_test_multiworld(players: int = 1) -> MultiWorld: + """ + Generates a multiworld using a special Test Case World class, and seed of 0. + + :param players: Number of players to generate the multiworld for + :return: The generated test multiworld + """ + multiworld = setup_multiworld([TestWorld] * players, seed=0) + multiworld.regions += [Region("Menu", player_id + 1, multiworld) for player_id in range(players)] + + return multiworld + + +def generate_locations(count: int, player_id: int, region: Region, address: Optional[int] = None, + tag: str = "") -> List[Location]: + """ + Generates the specified amount of locations for the player and adds them to the specified region. + + :param count: Number of locations to create + :param player_id: ID of the player to create the locations for + :param address: Address for the specified locations. They will all share the same address if multiple are created + :param region: Parent region to add these locations to + :param tag: Tag to add to the name of the generated locations + :return: List containing the created locations + """ + prefix = f"player{player_id}{tag}_location" + + locations = [Location(player_id, f"{prefix}{i}", address, region) for i in range(count)] + region.locations += locations + return locations + + +def generate_items(count: int, player_id: int, advancement: bool = False, code: int = None) -> List[Item]: + """ + Generates the specified amount of items for the target player. + + :param count: The amount of items to create + :param player_id: ID of the player to create the items for + :param advancement: Whether the created items should be advancement + :param code: The code the items should be created with + :return: List containing the created items + """ + item_type = "prog" if advancement else "" + classification = ItemClassification.progression if advancement else ItemClassification.filler + + items = [Item(f"player{player_id}_{item_type}item{i}", classification, code, player_id) for i in range(count)] + return items diff --git a/test/general/test_fill.py b/test/general/test_fill.py index 7b004db61fee..485007ff0d56 100644 --- a/test/general/test_fill.py +++ b/test/general/test_fill.py @@ -1,41 +1,15 @@ from typing import List, Iterable import unittest -import Options from Options import Accessibility -from worlds.AutoWorld import World +from test.general import generate_items, generate_locations, generate_test_multiworld from Fill import FillError, balance_multiworld_progression, fill_restrictive, \ distribute_early_items, distribute_items_restrictive from BaseClasses import Entrance, LocationProgressType, MultiWorld, Region, Item, Location, \ - ItemClassification, CollectionState + ItemClassification from worlds.generic.Rules import CollectionRule, add_item_rule, locality_rules, set_rule -def generate_multiworld(players: int = 1) -> MultiWorld: - multiworld = MultiWorld(players) - multiworld.set_seed(0) - multiworld.player_name = {} - multiworld.state = CollectionState(multiworld) - for i in range(players): - player_id = i+1 - world = World(multiworld, player_id) - multiworld.game[player_id] = f"Game {player_id}" - multiworld.worlds[player_id] = world - multiworld.player_name[player_id] = "Test Player " + str(player_id) - region = Region("Menu", player_id, multiworld, "Menu Region Hint") - multiworld.regions.append(region) - for option_key, option in Options.PerGameCommonOptions.type_hints.items(): - if hasattr(multiworld, option_key): - getattr(multiworld, option_key).setdefault(player_id, option.from_any(getattr(option, "default"))) - else: - setattr(multiworld, option_key, {player_id: option.from_any(getattr(option, "default"))}) - # TODO - remove this loop once all worlds use options dataclasses - world.options = world.options_dataclass(**{option_key: getattr(multiworld, option_key)[player_id] - for option_key in world.options_dataclass.type_hints}) - - return multiworld - - class PlayerDefinition(object): multiworld: MultiWorld id: int @@ -55,12 +29,12 @@ def __init__(self, multiworld: MultiWorld, id: int, menu: Region, locations: Lis self.regions = [menu] def generate_region(self, parent: Region, size: int, access_rule: CollectionRule = lambda state: True) -> Region: - region_tag = "_region" + str(len(self.regions)) - region_name = "player" + str(self.id) + region_tag - region = Region("player" + str(self.id) + region_tag, self.id, self.multiworld) - self.locations += generate_locations(size, self.id, None, region, region_tag) + region_tag = f"_region{len(self.regions)}" + region_name = f"player{self.id}{region_tag}" + region = Region(f"player{self.id}{region_tag}", self.id, self.multiworld) + self.locations += generate_locations(size, self.id, region, None, region_tag) - entrance = Entrance(self.id, region_name + "_entrance", parent) + entrance = Entrance(self.id, f"{region_name}_entrance", parent) parent.exits.append(entrance) entrance.connect(region) entrance.access_rule = access_rule @@ -94,7 +68,7 @@ def region_contains(region: Region, item: Item) -> bool: def generate_player_data(multiworld: MultiWorld, player_id: int, location_count: int = 0, prog_item_count: int = 0, basic_item_count: int = 0) -> PlayerDefinition: menu = multiworld.get_region("Menu", player_id) - locations = generate_locations(location_count, player_id, None, menu) + locations = generate_locations(location_count, player_id, menu, None) prog_items = generate_items(prog_item_count, player_id, True) multiworld.itempool += prog_items basic_items = generate_items(basic_item_count, player_id, False) @@ -103,28 +77,6 @@ def generate_player_data(multiworld: MultiWorld, player_id: int, location_count: return PlayerDefinition(multiworld, player_id, menu, locations, prog_items, basic_items) -def generate_locations(count: int, player_id: int, address: int = None, region: Region = None, tag: str = "") -> List[Location]: - locations = [] - prefix = "player" + str(player_id) + tag + "_location" - for i in range(count): - name = prefix + str(i) - location = Location(player_id, name, address, region) - locations.append(location) - region.locations.append(location) - return locations - - -def generate_items(count: int, player_id: int, advancement: bool = False, code: int = None) -> List[Item]: - items = [] - item_type = "prog" if advancement else "" - for i in range(count): - name = "player" + str(player_id) + "_" + item_type + "item" + str(i) - items.append(Item(name, - ItemClassification.progression if advancement else ItemClassification.filler, - code, player_id)) - return items - - def names(objs: list) -> Iterable[str]: return map(lambda o: o.name, objs) @@ -132,7 +84,7 @@ def names(objs: list) -> Iterable[str]: class TestFillRestrictive(unittest.TestCase): def test_basic_fill(self): """Tests `fill_restrictive` fills and removes the locations and items from their respective lists""" - multiworld = generate_multiworld() + multiworld = generate_test_multiworld() player1 = generate_player_data(multiworld, 1, 2, 2) item0 = player1.prog_items[0] @@ -150,7 +102,7 @@ def test_basic_fill(self): def test_ordered_fill(self): """Tests `fill_restrictive` fulfills set rules""" - multiworld = generate_multiworld() + multiworld = generate_test_multiworld() player1 = generate_player_data(multiworld, 1, 2, 2) items = player1.prog_items locations = player1.locations @@ -167,7 +119,7 @@ def test_ordered_fill(self): def test_partial_fill(self): """Tests that `fill_restrictive` returns unfilled locations""" - multiworld = generate_multiworld() + multiworld = generate_test_multiworld() player1 = generate_player_data(multiworld, 1, 3, 2) item0 = player1.prog_items[0] @@ -193,7 +145,7 @@ def test_partial_fill(self): def test_minimal_fill(self): """Test that fill for minimal player can have unreachable items""" - multiworld = generate_multiworld() + multiworld = generate_test_multiworld() player1 = generate_player_data(multiworld, 1, 2, 2) items = player1.prog_items @@ -218,7 +170,7 @@ def test_minimal_mixed_fill(self): the non-minimal player get all items. """ - multiworld = generate_multiworld(2) + multiworld = generate_test_multiworld(2) player1 = generate_player_data(multiworld, 1, 3, 3) player2 = generate_player_data(multiworld, 2, 3, 3) @@ -245,11 +197,11 @@ def test_minimal_mixed_fill(self): # all of player2's locations and items should be accessible (not all of player1's) for item in player2.prog_items: self.assertTrue(multiworld.state.has(item.name, player2.id), - f'{item} is unreachable in {item.location}') + f"{item} is unreachable in {item.location}") def test_reversed_fill(self): """Test a different set of rules can be satisfied""" - multiworld = generate_multiworld() + multiworld = generate_test_multiworld() player1 = generate_player_data(multiworld, 1, 2, 2) item0 = player1.prog_items[0] @@ -268,7 +220,7 @@ def test_reversed_fill(self): def test_multi_step_fill(self): """Test that fill is able to satisfy multiple spheres""" - multiworld = generate_multiworld() + multiworld = generate_test_multiworld() player1 = generate_player_data(multiworld, 1, 4, 4) items = player1.prog_items @@ -293,7 +245,7 @@ def test_multi_step_fill(self): def test_impossible_fill(self): """Test that fill raises an error when it can't place any items""" - multiworld = generate_multiworld() + multiworld = generate_test_multiworld() player1 = generate_player_data(multiworld, 1, 2, 2) items = player1.prog_items locations = player1.locations @@ -310,7 +262,7 @@ def test_impossible_fill(self): def test_circular_fill(self): """Test that fill raises an error when it can't place all items""" - multiworld = generate_multiworld() + multiworld = generate_test_multiworld() player1 = generate_player_data(multiworld, 1, 3, 3) item0 = player1.prog_items[0] @@ -331,7 +283,7 @@ def test_circular_fill(self): def test_competing_fill(self): """Test that fill raises an error when it can't place items in a way to satisfy the conditions""" - multiworld = generate_multiworld() + multiworld = generate_test_multiworld() player1 = generate_player_data(multiworld, 1, 2, 2) item0 = player1.prog_items[0] @@ -348,7 +300,7 @@ def test_competing_fill(self): def test_multiplayer_fill(self): """Test that items can be placed across worlds""" - multiworld = generate_multiworld(2) + multiworld = generate_test_multiworld(2) player1 = generate_player_data(multiworld, 1, 2, 2) player2 = generate_player_data(multiworld, 2, 2, 2) @@ -369,7 +321,7 @@ def test_multiplayer_fill(self): def test_multiplayer_rules_fill(self): """Test that fill across worlds satisfies the rules""" - multiworld = generate_multiworld(2) + multiworld = generate_test_multiworld(2) player1 = generate_player_data(multiworld, 1, 2, 2) player2 = generate_player_data(multiworld, 2, 2, 2) @@ -393,7 +345,7 @@ def test_multiplayer_rules_fill(self): def test_restrictive_progress(self): """Test that various spheres with different requirements can be filled""" - multiworld = generate_multiworld() + multiworld = generate_test_multiworld() player1 = generate_player_data(multiworld, 1, prog_item_count=25) items = player1.prog_items.copy() multiworld.completion_condition[player1.id] = lambda state: state.has_all( @@ -417,7 +369,7 @@ def test_restrictive_progress(self): def test_swap_to_earlier_location_with_item_rule(self): """Test that item swap happens and works as intended""" # test for PR#1109 - multiworld = generate_multiworld(1) + multiworld = generate_test_multiworld(1) player1 = generate_player_data(multiworld, 1, 4, 4) locations = player1.locations[:] # copy required items = player1.prog_items[:] # copy required @@ -442,7 +394,7 @@ def test_swap_to_earlier_location_with_item_rule(self): def test_swap_to_earlier_location_with_item_rule2(self): """Test that swap works before all items are placed""" - multiworld = generate_multiworld(1) + multiworld = generate_test_multiworld(1) player1 = generate_player_data(multiworld, 1, 5, 5) locations = player1.locations[:] # copy required items = player1.prog_items[:] # copy required @@ -484,7 +436,7 @@ def test_swap_to_earlier_location_with_item_rule2(self): def test_double_sweep(self): """Test that sweep doesn't duplicate Event items when sweeping""" # test for PR1114 - multiworld = generate_multiworld(1) + multiworld = generate_test_multiworld(1) player1 = generate_player_data(multiworld, 1, 1, 1) location = player1.locations[0] location.address = None @@ -498,7 +450,7 @@ def test_double_sweep(self): def test_correct_item_instance_removed_from_pool(self): """Test that a placed item gets removed from the submitted pool""" - multiworld = generate_multiworld() + multiworld = generate_test_multiworld() player1 = generate_player_data(multiworld, 1, 2, 2) player1.prog_items[0].name = "Different_item_instance_but_same_item_name" @@ -515,7 +467,7 @@ def test_correct_item_instance_removed_from_pool(self): class TestDistributeItemsRestrictive(unittest.TestCase): def test_basic_distribute(self): """Test that distribute_items_restrictive is deterministic""" - multiworld = generate_multiworld() + multiworld = generate_test_multiworld() player1 = generate_player_data( multiworld, 1, 4, prog_item_count=2, basic_item_count=2) locations = player1.locations @@ -535,7 +487,7 @@ def test_basic_distribute(self): def test_excluded_distribute(self): """Test that distribute_items_restrictive doesn't put advancement items on excluded locations""" - multiworld = generate_multiworld() + multiworld = generate_test_multiworld() player1 = generate_player_data( multiworld, 1, 4, prog_item_count=2, basic_item_count=2) locations = player1.locations @@ -550,7 +502,7 @@ def test_excluded_distribute(self): def test_non_excluded_item_distribute(self): """Test that useful items aren't placed on excluded locations""" - multiworld = generate_multiworld() + multiworld = generate_test_multiworld() player1 = generate_player_data( multiworld, 1, 4, prog_item_count=2, basic_item_count=2) locations = player1.locations @@ -565,7 +517,7 @@ def test_non_excluded_item_distribute(self): def test_too_many_excluded_distribute(self): """Test that fill fails if it can't place all progression items due to too many excluded locations""" - multiworld = generate_multiworld() + multiworld = generate_test_multiworld() player1 = generate_player_data( multiworld, 1, 4, prog_item_count=2, basic_item_count=2) locations = player1.locations @@ -578,7 +530,7 @@ def test_too_many_excluded_distribute(self): def test_non_excluded_item_must_distribute(self): """Test that fill fails if it can't place useful items due to too many excluded locations""" - multiworld = generate_multiworld() + multiworld = generate_test_multiworld() player1 = generate_player_data( multiworld, 1, 4, prog_item_count=2, basic_item_count=2) locations = player1.locations @@ -593,7 +545,7 @@ def test_non_excluded_item_must_distribute(self): def test_priority_distribute(self): """Test that priority locations receive advancement items""" - multiworld = generate_multiworld() + multiworld = generate_test_multiworld() player1 = generate_player_data( multiworld, 1, 4, prog_item_count=2, basic_item_count=2) locations = player1.locations @@ -608,7 +560,7 @@ def test_priority_distribute(self): def test_excess_priority_distribute(self): """Test that if there's more priority locations than advancement items, they can still fill""" - multiworld = generate_multiworld() + multiworld = generate_test_multiworld() player1 = generate_player_data( multiworld, 1, 4, prog_item_count=2, basic_item_count=2) locations = player1.locations @@ -623,7 +575,7 @@ def test_excess_priority_distribute(self): def test_multiple_world_priority_distribute(self): """Test that priority fill can be satisfied for multiple worlds""" - multiworld = generate_multiworld(3) + multiworld = generate_test_multiworld(3) player1 = generate_player_data( multiworld, 1, 4, prog_item_count=2, basic_item_count=2) player2 = generate_player_data( @@ -653,7 +605,7 @@ def test_multiple_world_priority_distribute(self): def test_can_remove_locations_in_fill_hook(self): """Test that distribute_items_restrictive calls the fill hook and allows for item and location removal""" - multiworld = generate_multiworld() + multiworld = generate_test_multiworld() player1 = generate_player_data( multiworld, 1, 4, prog_item_count=2, basic_item_count=2) @@ -673,12 +625,12 @@ def fill_hook(progitempool, usefulitempool, filleritempool, fill_locations): def test_seed_robust_to_item_order(self): """Test deterministic fill""" - mw1 = generate_multiworld() + mw1 = generate_test_multiworld() gen1 = generate_player_data( mw1, 1, 4, prog_item_count=2, basic_item_count=2) distribute_items_restrictive(mw1) - mw2 = generate_multiworld() + mw2 = generate_test_multiworld() gen2 = generate_player_data( mw2, 1, 4, prog_item_count=2, basic_item_count=2) mw2.itempool.append(mw2.itempool.pop(0)) @@ -691,12 +643,12 @@ def test_seed_robust_to_item_order(self): def test_seed_robust_to_location_order(self): """Test deterministic fill even if locations in a region are reordered""" - mw1 = generate_multiworld() + mw1 = generate_test_multiworld() gen1 = generate_player_data( mw1, 1, 4, prog_item_count=2, basic_item_count=2) distribute_items_restrictive(mw1) - mw2 = generate_multiworld() + mw2 = generate_test_multiworld() gen2 = generate_player_data( mw2, 1, 4, prog_item_count=2, basic_item_count=2) reg = mw2.get_region("Menu", gen2.id) @@ -710,7 +662,7 @@ def test_seed_robust_to_location_order(self): def test_can_reserve_advancement_items_for_general_fill(self): """Test that priority locations fill still satisfies item rules""" - multiworld = generate_multiworld() + multiworld = generate_test_multiworld() player1 = generate_player_data( multiworld, 1, location_count=5, prog_item_count=5) items = player1.prog_items @@ -727,7 +679,7 @@ def test_can_reserve_advancement_items_for_general_fill(self): def test_non_excluded_local_items(self): """Test that local items get placed locally in a multiworld""" - multiworld = generate_multiworld(2) + multiworld = generate_test_multiworld(2) player1 = generate_player_data( multiworld, 1, location_count=5, basic_item_count=5) player2 = generate_player_data( @@ -748,7 +700,7 @@ def test_non_excluded_local_items(self): def test_early_items(self) -> None: """Test that the early items API successfully places items early""" - mw = generate_multiworld(2) + mw = generate_test_multiworld(2) player1 = generate_player_data(mw, 1, location_count=5, basic_item_count=5) player2 = generate_player_data(mw, 2, location_count=5, basic_item_count=5) mw.early_items[1][player1.basic_items[0].name] = 1 @@ -803,11 +755,11 @@ def assertRegionContains(self, region: Region, item: Item) -> bool: if location.item and location.item == item: return True - self.fail("Expected " + region.name + " to contain " + item.name + - "\n Contains" + str(list(map(lambda location: location.item, region.locations)))) + self.fail(f"Expected {region.name} to contain {item.name}.\n" + f"Contains{list(map(lambda location: location.item, region.locations))}") def setUp(self) -> None: - multiworld = generate_multiworld(2) + multiworld = generate_test_multiworld(2) self.multiworld = multiworld player1 = generate_player_data( multiworld, 1, prog_item_count=2, basic_item_count=40) From c64c80aac06de3d8e5a1985f47f7961645498279 Mon Sep 17 00:00:00 2001 From: Scipio Wright Date: Thu, 2 May 2024 04:02:59 -0400 Subject: [PATCH 136/153] TUNIC: Location groups for each area of the game (#3024) * huzzah, location groups * scope creep pog * Apply suggestion to the other spot it is applicable at too * apply berserker's suggestion Co-authored-by: Fabian Dill * Remove extra location group for shops * Fire rod for magic wand * Capitalize itme name groups * Update docs to capitalize item name groups, remove the little section on aliases since the aliases bit is really more for someone misremembering the name than anything else, like "fire rod" is because you played a lot of LttP, or Orb instead of Magic Orb is clear. * Fix rule with item group name * Capitalization is cool * Fix merge mistake * Add Flask group, remove Potions group * Update docs to detail how to find item and location groups * Revise per Vi's comment * Fix test * fuzzy matching please stop * Remove test change that was meant for a different branch --------- Co-authored-by: Fabian Dill --- worlds/tunic/__init__.py | 4 +- worlds/tunic/docs/en_TUNIC.md | 7 +- worlds/tunic/er_rules.py | 2 +- worlds/tunic/items.py | 313 +++++++++++++++++----------------- worlds/tunic/locations.py | 117 +++++++------ 5 files changed, 221 insertions(+), 222 deletions(-) diff --git a/worlds/tunic/__init__.py b/worlds/tunic/__init__.py index 77324b2047b4..356af56ebd3e 100644 --- a/worlds/tunic/__init__.py +++ b/worlds/tunic/__init__.py @@ -140,7 +140,7 @@ def remove_filler(amount: int) -> None: if self.options.shuffle_ladders: ladder_count = 0 for item_name, item_data in item_table.items(): - if item_data.item_group == "ladders": + if item_data.item_group == "Ladders": items_to_create[item_name] = 1 ladder_count += 1 remove_filler(ladder_count) @@ -259,7 +259,7 @@ def extend_hint_information(self, hint_data: Dict[int, Dict[int, str]]) -> None: name, connection = connection # for LS entrances, we just want to give the portal name if "(LS)" in name: - name, _ = name.split(" (LS) ") + name = name.split(" (LS) ", 1)[0] # was getting some cases like Library Grave -> Library Grave -> other place if name in portal_names and name != previous_name: previous_name = name diff --git a/worlds/tunic/docs/en_TUNIC.md b/worlds/tunic/docs/en_TUNIC.md index 57a9167d1906..29a7255ea771 100644 --- a/worlds/tunic/docs/en_TUNIC.md +++ b/worlds/tunic/docs/en_TUNIC.md @@ -64,11 +64,8 @@ For the Entrance Randomizer: - The portal in the trophy room of the Old House is active from the start. - The elevator in Cathedral is immediately usable without activating the fuse. Activating the fuse does nothing. -## What item groups are there? -Bombs, consumables (non-bomb ones), weapons, melee weapons (stick and sword), keys, hexagons, offerings, hero relics, cards, golden treasures, money, pages, and abilities (the three ability pages). There are also a few groups being used for singular items: laurels, orb, dagger, magic rod, holy cross, prayer, icebolt, and progressive sword. - -## What location groups are there? -Holy cross (for all holy cross checks), fairies (for the two fairy checks), well (for the coin well checks), shop, bosses (for the bosses with checks associated with them), hero relic (for the 6 hero grave checks), and ladders (for the ladder items when you have shuffle ladders enabled). +## Does this game have item and location groups? +Yes! To find what they are, open up the Archipelago Text Client while connected to a TUNIC session and type in `/item_groups` or `/location_groups`. ## Is Connection Plando supported? Yes. The host needs to enable it in their `host.yaml`, and the player's yaml needs to contain a plando_connections block. diff --git a/worlds/tunic/er_rules.py b/worlds/tunic/er_rules.py index dde142c88abc..6352d96bf407 100644 --- a/worlds/tunic/er_rules.py +++ b/worlds/tunic/er_rules.py @@ -1452,7 +1452,7 @@ def set_er_location_rules(world: "TunicWorld", ability_unlocks: Dict[str, int]) # Beneath the Vault set_rule(multiworld.get_location("Beneath the Fortress - Bridge", player), - lambda state: state.has_group("melee weapons", player, 1) or state.has_any({laurels, fire_wand}, player)) + lambda state: state.has_group("Melee Weapons", player, 1) or state.has_any({laurels, fire_wand}, player)) set_rule(multiworld.get_location("Beneath the Fortress - Obscured Behind Waterfall", player), lambda state: has_lantern(state, player, options)) diff --git a/worlds/tunic/items.py b/worlds/tunic/items.py index 7483d55bf1cc..6efdeaa3eabb 100644 --- a/worlds/tunic/items.py +++ b/worlds/tunic/items.py @@ -13,158 +13,158 @@ 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"), + "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"), + "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.useful, 1, 30, "weapons"), + "Gun": TunicItemData(ItemClassification.useful, 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, "potions"), - "Potion Flask": TunicItemData(ItemClassification.useful, 5, 38, "potions"), + "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.useful, 1, 51, "hero relics"), - "Hero Relic - DEF": TunicItemData(ItemClassification.useful, 1, 52, "hero relics"), - "Hero Relic - HP": TunicItemData(ItemClassification.useful, 1, 53, "hero relics"), - "Hero Relic - MP": TunicItemData(ItemClassification.useful, 1, 54, "hero relics"), - "Hero Relic - POTION": TunicItemData(ItemClassification.useful, 1, 55, "hero relics"), - "Hero Relic - SP": TunicItemData(ItemClassification.useful, 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, "fool"), - "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"), + "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.useful, 1, 51, "Hero Relics"), + "Hero Relic - DEF": TunicItemData(ItemClassification.useful, 1, 52, "Hero Relics"), + "Hero Relic - HP": TunicItemData(ItemClassification.useful, 1, 53, "Hero Relics"), + "Hero Relic - MP": TunicItemData(ItemClassification.useful, 1, 54, "Hero Relics"), + "Hero Relic - POTION": TunicItemData(ItemClassification.useful, 1, 55, "Hero Relics"), + "Hero Relic - SP": TunicItemData(ItemClassification.useful, 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"), + "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"), } fool_tiers: List[List[str]] = [ @@ -220,20 +220,23 @@ def get_item_group(item_name: str) -> str: # extra groups for the purpose of aliasing items extra_groups: Dict[str, Set[str]] = { - "laurels": {"Hero's Laurels"}, - "orb": {"Magic Orb"}, - "dagger": {"Magic Dagger"}, - "magic rod": {"Magic Wand"}, - "holy cross": {"Pages 42-43 (Holy Cross)"}, - "prayer": {"Pages 24-25 (Prayer)"}, - "icebolt": {"Pages 52-53 (Icebolt)"}, - "ice rod": {"Pages 52-53 (Icebolt)"}, - "melee weapons": {"Stick", "Sword", "Sword Upgrade"}, - "progressive sword": {"Sword Upgrade"}, - "abilities": {"Pages 24-25 (Prayer)", "Pages 42-43 (Holy Cross)", "Pages 52-53 (Icebolt)"}, - "questagons": {"Red Questagon", "Green Questagon", "Blue Questagon", "Gold Questagon"}, - "ladder to atoll": {"Ladder to Ruined Atoll"}, # fuzzy matching made it hint Ladders in Well, now it won't - "ladders to bell": {"Ladders to West Bell"}, + "Laurels": {"Hero's Laurels"}, + "Orb": {"Magic Orb"}, + "Dagger": {"Magic Dagger"}, + "Wand": {"Magic Wand"}, + "Magic Rod": {"Magic Wand"}, + "Fire Rod": {"Magic Wand"}, + "Holy Cross": {"Pages 42-43 (Holy Cross)"}, + "Prayer": {"Pages 24-25 (Prayer)"}, + "Icebolt": {"Pages 52-53 (Icebolt)"}, + "Ice Rod": {"Pages 52-53 (Icebolt)"}, + "Melee Weapons": {"Stick", "Sword", "Sword Upgrade"}, + "Progressive Sword": {"Sword Upgrade"}, + "Abilities": {"Pages 24-25 (Prayer)", "Pages 42-43 (Holy Cross)", "Pages 52-53 (Icebolt)"}, + "Questagons": {"Red Questagon", "Green Questagon", "Blue Questagon", "Gold Questagon"}, + "Ladder to Atoll": {"Ladder to Ruined Atoll"}, # fuzzy matching made it hint Ladders in Well, now it won't + "Ladders to Bell": {"Ladders to West Bell"}, + "Ladders to Well": {"Ladders in Well"}, # fuzzy matching decided ladders in well was ladders to west bell } item_name_groups.update(extra_groups) diff --git a/worlds/tunic/locations.py b/worlds/tunic/locations.py index 9974e60571c2..fdf662167953 100644 --- a/worlds/tunic/locations.py +++ b/worlds/tunic/locations.py @@ -1,11 +1,10 @@ -from typing import Dict, NamedTuple, Set, Optional, List +from typing import Dict, NamedTuple, Set, Optional class TunicLocationData(NamedTuple): region: str er_region: str # entrance rando region location_group: Optional[str] = None - location_groups: Optional[List[str]] = None location_base_id = 509342400 @@ -46,8 +45,8 @@ class TunicLocationData(NamedTuple): "Guardhouse 2 - Bottom Floor Secret": TunicLocationData("East Forest", "Guard House 2 Lower"), "Guardhouse 1 - Upper Floor Obscured": TunicLocationData("East Forest", "Guard House 1 East"), "Guardhouse 1 - Upper Floor": TunicLocationData("East Forest", "Guard House 1 East"), - "East Forest - Dancing Fox Spirit Holy Cross": TunicLocationData("East Forest", "East Forest Dance Fox Spot", location_group="holy cross"), - "East Forest - Golden Obelisk Holy Cross": TunicLocationData("East Forest", "Lower Forest", location_group="holy cross"), + "East Forest - Dancing Fox Spirit Holy Cross": TunicLocationData("East Forest", "East Forest Dance Fox Spot", location_group="Holy Cross"), + "East Forest - Golden Obelisk Holy Cross": TunicLocationData("East Forest", "Lower Forest", location_group="Holy Cross"), "East Forest - Ice Rod Grapple Chest": TunicLocationData("East Forest", "East Forest"), "East Forest - Above Save Point": TunicLocationData("East Forest", "East Forest"), "East Forest - Above Save Point Obscured": TunicLocationData("East Forest", "East Forest"), @@ -65,18 +64,18 @@ class TunicLocationData(NamedTuple): "Forest Belltower - Obscured Near Bell Top Floor": TunicLocationData("East Forest", "Forest Belltower Upper"), "Forest Belltower - Obscured Beneath Bell Bottom Floor": TunicLocationData("East Forest", "Forest Belltower Main"), "Forest Belltower - Page Pickup": TunicLocationData("East Forest", "Forest Belltower Main"), - "Forest Grave Path - Holy Cross Code by Grave": TunicLocationData("East Forest", "Forest Grave Path by Grave", location_group="holy cross"), + "Forest Grave Path - Holy Cross Code by Grave": TunicLocationData("East Forest", "Forest Grave Path by Grave", location_group="Holy Cross"), "Forest Grave Path - Above Gate": TunicLocationData("East Forest", "Forest Grave Path Main"), "Forest Grave Path - Obscured Chest": TunicLocationData("East Forest", "Forest Grave Path Main"), "Forest Grave Path - Upper Walkway": TunicLocationData("East Forest", "Forest Grave Path Upper"), "Forest Grave Path - Sword Pickup": TunicLocationData("East Forest", "Forest Grave Path by Grave"), - "Hero's Grave - Tooth Relic": TunicLocationData("East Forest", "Hero Relic - East Forest", location_group="hero relic"), + "Hero's Grave - Tooth Relic": TunicLocationData("East Forest", "Hero Relic - East Forest"), "Fortress Courtyard - From East Belltower": TunicLocationData("East Forest", "Fortress Exterior from East Forest"), "Fortress Leaf Piles - Secret Chest": TunicLocationData("Eastern Vault Fortress", "Fortress Leaf Piles"), "Fortress Arena - Hexagon Red": TunicLocationData("Eastern Vault Fortress", "Fortress Arena"), - "Fortress Arena - Siege Engine/Vault Key Pickup": TunicLocationData("Eastern Vault Fortress", "Fortress Arena", location_group="bosses"), + "Fortress Arena - Siege Engine/Vault Key Pickup": TunicLocationData("Eastern Vault Fortress", "Fortress Arena", location_group="Bosses"), "Fortress East Shortcut - Chest Near Slimes": TunicLocationData("Eastern Vault Fortress", "Fortress East Shortcut Lower"), - "Eastern Vault Fortress - [West Wing] Candles Holy Cross": TunicLocationData("Eastern Vault Fortress", "Eastern Vault Fortress", location_group="holy cross"), + "Eastern Vault Fortress - [West Wing] Candles Holy Cross": TunicLocationData("Eastern Vault Fortress", "Eastern Vault Fortress", location_group="Holy Cross"), "Eastern Vault Fortress - [West Wing] Dark Room Chest 1": TunicLocationData("Eastern Vault Fortress", "Eastern Vault Fortress"), "Eastern Vault Fortress - [West Wing] Dark Room Chest 2": TunicLocationData("Eastern Vault Fortress", "Eastern Vault Fortress"), "Eastern Vault Fortress - [East Wing] Bombable Wall": TunicLocationData("Eastern Vault Fortress", "Eastern Vault Fortress"), @@ -84,7 +83,7 @@ class TunicLocationData(NamedTuple): "Fortress Grave Path - Upper Walkway": TunicLocationData("Eastern Vault Fortress", "Fortress Grave Path Upper"), "Fortress Grave Path - Chest Right of Grave": TunicLocationData("Eastern Vault Fortress", "Fortress Grave Path"), "Fortress Grave Path - Obscured Chest Left of Grave": TunicLocationData("Eastern Vault Fortress", "Fortress Grave Path"), - "Hero's Grave - Flowers Relic": TunicLocationData("Eastern Vault Fortress", "Hero Relic - Fortress", location_group="hero relic"), + "Hero's Grave - Flowers Relic": TunicLocationData("Eastern Vault Fortress", "Hero Relic - Fortress"), "Beneath the Fortress - Bridge": TunicLocationData("Beneath the Vault", "Beneath the Vault Back"), "Beneath the Fortress - Cell Chest 1": TunicLocationData("Beneath the Vault", "Beneath the Vault Back"), "Beneath the Fortress - Obscured Behind Waterfall": TunicLocationData("Beneath the Vault", "Beneath the Vault Front"), @@ -101,8 +100,8 @@ class TunicLocationData(NamedTuple): "Frog's Domain - Side Room Chest": TunicLocationData("Frog's Domain", "Frog's Domain"), "Frog's Domain - Side Room Grapple Secret": TunicLocationData("Frog's Domain", "Frog's Domain"), "Frog's Domain - Magic Orb Pickup": TunicLocationData("Frog's Domain", "Frog's Domain"), - "Librarian - Hexagon Green": TunicLocationData("Library", "Library Arena", location_group="bosses"), - "Library Hall - Holy Cross Chest": TunicLocationData("Library", "Library Hall", location_group="holy cross"), + "Librarian - Hexagon Green": TunicLocationData("Library", "Library Arena", location_group="Bosses"), + "Library Hall - Holy Cross Chest": TunicLocationData("Library", "Library Hall", location_group="Holy Cross"), "Library Lab - Chest By Shrine 2": TunicLocationData("Library", "Library Lab"), "Library Lab - Chest By Shrine 1": TunicLocationData("Library", "Library Lab"), "Library Lab - Chest By Shrine 3": TunicLocationData("Library", "Library Lab"), @@ -110,7 +109,7 @@ class TunicLocationData(NamedTuple): "Library Lab - Page 3": TunicLocationData("Library", "Library Lab"), "Library Lab - Page 1": TunicLocationData("Library", "Library Lab"), "Library Lab - Page 2": TunicLocationData("Library", "Library Lab"), - "Hero's Grave - Mushroom Relic": TunicLocationData("Library", "Hero Relic - Library", location_group="hero relic"), + "Hero's Grave - Mushroom Relic": TunicLocationData("Library", "Hero Relic - Library"), "Lower Mountain - Page Before Door": TunicLocationData("Overworld", "Lower Mountain"), "Changing Room - Normal Chest": TunicLocationData("Overworld", "Changing Room"), "Fortress Courtyard - Chest Near Cave": TunicLocationData("Overworld", "Fortress Exterior near cave"), @@ -165,49 +164,49 @@ class TunicLocationData(NamedTuple): "Ruined Shop - Chest 2": TunicLocationData("Overworld", "Ruined Shop"), "Ruined Shop - Chest 3": TunicLocationData("Overworld", "Ruined Shop"), "Ruined Passage - Page Pickup": TunicLocationData("Overworld", "Ruined Passage"), - "Shop - Potion 1": TunicLocationData("Overworld", "Shop", location_group="shop"), - "Shop - Potion 2": TunicLocationData("Overworld", "Shop", location_group="shop"), - "Shop - Coin 1": TunicLocationData("Overworld", "Shop", location_group="shop"), - "Shop - Coin 2": TunicLocationData("Overworld", "Shop", location_group="shop"), + "Shop - Potion 1": TunicLocationData("Overworld", "Shop"), + "Shop - Potion 2": TunicLocationData("Overworld", "Shop"), + "Shop - Coin 1": TunicLocationData("Overworld", "Shop"), + "Shop - Coin 2": TunicLocationData("Overworld", "Shop"), "Special Shop - Secret Page Pickup": TunicLocationData("Overworld", "Special Shop"), "Stick House - Stick Chest": TunicLocationData("Overworld", "Stick House"), "Sealed Temple - Page Pickup": TunicLocationData("Overworld", "Sealed Temple"), "Hourglass Cave - Hourglass Chest": TunicLocationData("Overworld", "Hourglass Cave"), "Far Shore - Secret Chest": TunicLocationData("Overworld", "Far Shore"), "Far Shore - Page Pickup": TunicLocationData("Overworld", "Far Shore to Spawn Region"), - "Coins in the Well - 10 Coins": TunicLocationData("Overworld", "Overworld", location_group="well"), - "Coins in the Well - 15 Coins": TunicLocationData("Overworld", "Overworld", location_group="well"), - "Coins in the Well - 3 Coins": TunicLocationData("Overworld", "Overworld", location_group="well"), - "Coins in the Well - 6 Coins": TunicLocationData("Overworld", "Overworld", location_group="well"), - "Secret Gathering Place - 20 Fairy Reward": TunicLocationData("Overworld", "Secret Gathering Place", location_group="fairies"), - "Secret Gathering Place - 10 Fairy Reward": TunicLocationData("Overworld", "Secret Gathering Place", location_group="fairies"), - "Overworld - [West] Moss Wall Holy Cross": TunicLocationData("Overworld Holy Cross", "Overworld Holy Cross", location_group="holy cross"), - "Overworld - [Southwest] Flowers Holy Cross": TunicLocationData("Overworld Holy Cross", "Overworld Beach", location_group="holy cross"), - "Overworld - [Southwest] Fountain Holy Cross": TunicLocationData("Overworld Holy Cross", "Overworld Holy Cross", location_group="holy cross"), - "Overworld - [Northeast] Flowers Holy Cross": TunicLocationData("Overworld Holy Cross", "East Overworld", location_group="holy cross"), - "Overworld - [East] Weathervane Holy Cross": TunicLocationData("Overworld Holy Cross", "East Overworld", location_group="holy cross"), - "Overworld - [West] Windmill Holy Cross": TunicLocationData("Overworld Holy Cross", "Overworld Holy Cross", location_group="holy cross"), - "Overworld - [Southwest] Haiku Holy Cross": TunicLocationData("Overworld Holy Cross", "Overworld Beach", location_group="holy cross"), - "Overworld - [West] Windchimes Holy Cross": TunicLocationData("Overworld Holy Cross", "Overworld Holy Cross", location_group="holy cross"), - "Overworld - [South] Starting Platform Holy Cross": TunicLocationData("Overworld Holy Cross", "Overworld Holy Cross", location_group="holy cross"), - "Overworld - [Northwest] Golden Obelisk Page": TunicLocationData("Overworld Holy Cross", "Upper Overworld", location_group="holy cross"), - "Old House - Holy Cross Door Page": TunicLocationData("Overworld Holy Cross", "Old House Back", location_group="holy cross"), - "Cube Cave - Holy Cross Chest": TunicLocationData("Overworld Holy Cross", "Cube Cave", location_group="holy cross"), - "Southeast Cross Door - Chest 3": TunicLocationData("Overworld Holy Cross", "Southeast Cross Room", location_group="holy cross"), - "Southeast Cross Door - Chest 2": TunicLocationData("Overworld Holy Cross", "Southeast Cross Room", location_group="holy cross"), - "Southeast Cross Door - Chest 1": TunicLocationData("Overworld Holy Cross", "Southeast Cross Room", location_group="holy cross"), - "Maze Cave - Maze Room Holy Cross": TunicLocationData("Overworld Holy Cross", "Maze Cave", location_group="holy cross"), - "Caustic Light Cave - Holy Cross Chest": TunicLocationData("Overworld Holy Cross", "Caustic Light Cave", location_group="holy cross"), - "Old House - Holy Cross Chest": TunicLocationData("Overworld Holy Cross", "Old House Front", location_group="holy cross"), - "Patrol Cave - Holy Cross Chest": TunicLocationData("Overworld Holy Cross", "Patrol Cave", location_group="holy cross"), - "Ruined Passage - Holy Cross Chest": TunicLocationData("Overworld Holy Cross", "Ruined Passage", location_group="holy cross"), - "Hourglass Cave - Holy Cross Chest": TunicLocationData("Overworld Holy Cross", "Hourglass Cave Tower", location_group="holy cross"), - "Sealed Temple - Holy Cross Chest": TunicLocationData("Overworld Holy Cross", "Sealed Temple", location_group="holy cross"), - "Fountain Cross Door - Page Pickup": TunicLocationData("Overworld Holy Cross", "Fountain Cross Room", location_group="holy cross"), - "Secret Gathering Place - Holy Cross Chest": TunicLocationData("Overworld Holy Cross", "Secret Gathering Place", location_group="holy cross"), - "Top of the Mountain - Page At The Peak": TunicLocationData("Overworld Holy Cross", "Top of the Mountain", location_group="holy cross"), + "Coins in the Well - 10 Coins": TunicLocationData("Overworld", "Overworld", location_group="Well"), + "Coins in the Well - 15 Coins": TunicLocationData("Overworld", "Overworld", location_group="Well"), + "Coins in the Well - 3 Coins": TunicLocationData("Overworld", "Overworld", location_group="Well"), + "Coins in the Well - 6 Coins": TunicLocationData("Overworld", "Overworld", location_group="Well"), + "Secret Gathering Place - 20 Fairy Reward": TunicLocationData("Overworld", "Secret Gathering Place", location_group="Fairies"), + "Secret Gathering Place - 10 Fairy Reward": TunicLocationData("Overworld", "Secret Gathering Place", location_group="Fairies"), + "Overworld - [West] Moss Wall Holy Cross": TunicLocationData("Overworld Holy Cross", "Overworld Holy Cross", location_group="Holy Cross"), + "Overworld - [Southwest] Flowers Holy Cross": TunicLocationData("Overworld Holy Cross", "Overworld Beach", location_group="Holy Cross"), + "Overworld - [Southwest] Fountain Holy Cross": TunicLocationData("Overworld Holy Cross", "Overworld Holy Cross", location_group="Holy Cross"), + "Overworld - [Northeast] Flowers Holy Cross": TunicLocationData("Overworld Holy Cross", "East Overworld", location_group="Holy Cross"), + "Overworld - [East] Weathervane Holy Cross": TunicLocationData("Overworld Holy Cross", "East Overworld", location_group="Holy Cross"), + "Overworld - [West] Windmill Holy Cross": TunicLocationData("Overworld Holy Cross", "Overworld Holy Cross", location_group="Holy Cross"), + "Overworld - [Southwest] Haiku Holy Cross": TunicLocationData("Overworld Holy Cross", "Overworld Beach", location_group="Holy Cross"), + "Overworld - [West] Windchimes Holy Cross": TunicLocationData("Overworld Holy Cross", "Overworld Holy Cross", location_group="Holy Cross"), + "Overworld - [South] Starting Platform Holy Cross": TunicLocationData("Overworld Holy Cross", "Overworld Holy Cross", location_group="Holy Cross"), + "Overworld - [Northwest] Golden Obelisk Page": TunicLocationData("Overworld Holy Cross", "Upper Overworld", location_group="Holy Cross"), + "Old House - Holy Cross Door Page": TunicLocationData("Overworld Holy Cross", "Old House Back", location_group="Holy Cross"), + "Cube Cave - Holy Cross Chest": TunicLocationData("Overworld Holy Cross", "Cube Cave", location_group="Holy Cross"), + "Southeast Cross Door - Chest 3": TunicLocationData("Overworld Holy Cross", "Southeast Cross Room", location_group="Holy Cross"), + "Southeast Cross Door - Chest 2": TunicLocationData("Overworld Holy Cross", "Southeast Cross Room", location_group="Holy Cross"), + "Southeast Cross Door - Chest 1": TunicLocationData("Overworld Holy Cross", "Southeast Cross Room", location_group="Holy Cross"), + "Maze Cave - Maze Room Holy Cross": TunicLocationData("Overworld Holy Cross", "Maze Cave", location_group="Holy Cross"), + "Caustic Light Cave - Holy Cross Chest": TunicLocationData("Overworld Holy Cross", "Caustic Light Cave", location_group="Holy Cross"), + "Old House - Holy Cross Chest": TunicLocationData("Overworld Holy Cross", "Old House Front", location_group="Holy Cross"), + "Patrol Cave - Holy Cross Chest": TunicLocationData("Overworld Holy Cross", "Patrol Cave", location_group="Holy Cross"), + "Ruined Passage - Holy Cross Chest": TunicLocationData("Overworld Holy Cross", "Ruined Passage", location_group="Holy Cross"), + "Hourglass Cave - Holy Cross Chest": TunicLocationData("Overworld Holy Cross", "Hourglass Cave Tower", location_group="Holy Cross"), + "Sealed Temple - Holy Cross Chest": TunicLocationData("Overworld Holy Cross", "Sealed Temple", location_group="Holy Cross"), + "Fountain Cross Door - Page Pickup": TunicLocationData("Overworld Holy Cross", "Fountain Cross Room", location_group="Holy Cross"), + "Secret Gathering Place - Holy Cross Chest": TunicLocationData("Overworld Holy Cross", "Secret Gathering Place", location_group="Holy Cross"), + "Top of the Mountain - Page At The Peak": TunicLocationData("Overworld Holy Cross", "Top of the Mountain", location_group="Holy Cross"), "Monastery - Monastery Chest": TunicLocationData("Quarry", "Monastery Back"), - "Quarry - [Back Entrance] Bushes Holy Cross": TunicLocationData("Quarry Back", "Quarry Back", location_group="holy cross"), + "Quarry - [Back Entrance] Bushes Holy Cross": TunicLocationData("Quarry Back", "Quarry Back", location_group="Holy Cross"), "Quarry - [Back Entrance] Chest": TunicLocationData("Quarry Back", "Quarry Back"), "Quarry - [Central] Near Shortcut Ladder": TunicLocationData("Quarry", "Quarry"), "Quarry - [East] Near Telescope": TunicLocationData("Quarry", "Quarry"), @@ -225,7 +224,7 @@ class TunicLocationData(NamedTuple): "Quarry - [Central] Above Ladder Dash Chest": TunicLocationData("Quarry", "Quarry Monastery Entry"), "Quarry - [West] Upper Area Bombable Wall": TunicLocationData("Quarry Back", "Quarry Back"), "Quarry - [East] Bombable Wall": TunicLocationData("Quarry", "Quarry"), - "Hero's Grave - Ash Relic": TunicLocationData("Quarry", "Hero Relic - Quarry", location_group="hero relics"), + "Hero's Grave - Ash Relic": TunicLocationData("Quarry", "Hero Relic - Quarry"), "Quarry - [West] Shooting Range Secret Path": TunicLocationData("Lower Quarry", "Lower Quarry"), "Quarry - [West] Near Shooting Range": TunicLocationData("Lower Quarry", "Lower Quarry"), "Quarry - [West] Below Shooting Range": TunicLocationData("Lower Quarry", "Lower Quarry"), @@ -246,7 +245,7 @@ class TunicLocationData(NamedTuple): "Rooted Ziggurat Lower - Guarded By Double Turrets": TunicLocationData("Rooted Ziggurat", "Rooted Ziggurat Lower Front"), "Rooted Ziggurat Lower - After 2nd Double Turret Chest": TunicLocationData("Rooted Ziggurat", "Rooted Ziggurat Lower Front"), "Rooted Ziggurat Lower - Guarded By Double Turrets 2": TunicLocationData("Rooted Ziggurat", "Rooted Ziggurat Lower Front"), - "Rooted Ziggurat Lower - Hexagon Blue": TunicLocationData("Rooted Ziggurat", "Rooted Ziggurat Lower Back", location_group="bosses"), + "Rooted Ziggurat Lower - Hexagon Blue": TunicLocationData("Rooted Ziggurat", "Rooted Ziggurat Lower Back", location_group="Bosses"), "Ruined Atoll - [West] Near Kevin Block": TunicLocationData("Ruined Atoll", "Ruined Atoll"), "Ruined Atoll - [South] Upper Floor On Power Line": TunicLocationData("Ruined Atoll", "Ruined Atoll Ladder Tops"), "Ruined Atoll - [South] Chest Near Big Crabs": TunicLocationData("Ruined Atoll", "Ruined Atoll"), @@ -288,14 +287,14 @@ class TunicLocationData(NamedTuple): "Swamp - [South Graveyard] Upper Walkway Dash Chest": TunicLocationData("Swamp", "Swamp Mid"), "Swamp - [South Graveyard] Above Big Skeleton": TunicLocationData("Swamp", "Swamp Front"), "Swamp - [Central] Beneath Memorial": TunicLocationData("Swamp", "Swamp Mid"), - "Hero's Grave - Feathers Relic": TunicLocationData("Swamp", "Hero Relic - Swamp", location_group="hero relic"), + "Hero's Grave - Feathers Relic": TunicLocationData("Swamp", "Hero Relic - Swamp"), "West Furnace - Chest": TunicLocationData("West Garden", "Furnace Walking Path"), "Overworld - [West] Near West Garden Entrance": TunicLocationData("West Garden", "Overworld to West Garden from Furnace"), - "West Garden - [Central Highlands] Holy Cross (Blue Lines)": TunicLocationData("West Garden", "West Garden", location_group="holy cross"), - "West Garden - [West Lowlands] Tree Holy Cross Chest": TunicLocationData("West Garden", "West Garden", location_group="holy cross"), + "West Garden - [Central Highlands] Holy Cross (Blue Lines)": TunicLocationData("West Garden", "West Garden", location_group="Holy Cross"), + "West Garden - [West Lowlands] Tree Holy Cross Chest": TunicLocationData("West Garden", "West Garden", location_group="Holy Cross"), "West Garden - [Southeast Lowlands] Outside Cave": TunicLocationData("West Garden", "West Garden"), "West Garden - [Central Lowlands] Chest Beneath Faeries": TunicLocationData("West Garden", "West Garden"), - "West Garden - [North] Behind Holy Cross Door": TunicLocationData("West Garden", "West Garden", location_group="holy cross"), + "West Garden - [North] Behind Holy Cross Door": TunicLocationData("West Garden", "West Garden", location_group="Holy Cross"), "West Garden - [Central Highlands] Top of Ladder Before Boss": TunicLocationData("West Garden", "West Garden"), "West Garden - [Central Lowlands] Passage Beneath Bridge": TunicLocationData("West Garden", "West Garden"), "West Garden - [North] Across From Page Pickup": TunicLocationData("West Garden", "West Garden"), @@ -307,12 +306,12 @@ class TunicLocationData(NamedTuple): "West Garden - [West Highlands] Upper Left Walkway": TunicLocationData("West Garden", "West Garden"), "West Garden - [Central Lowlands] Chest Beneath Save Point": TunicLocationData("West Garden", "West Garden"), "West Garden - [Central Highlands] Behind Guard Captain": TunicLocationData("West Garden", "West Garden"), - "West Garden - [Central Highlands] After Garden Knight": TunicLocationData("Overworld", "West Garden after Boss", location_group="bosses"), + "West Garden - [Central Highlands] After Garden Knight": TunicLocationData("Overworld", "West Garden after Boss", location_group="Bosses"), "West Garden - [South Highlands] Secret Chest Beneath Fuse": TunicLocationData("West Garden", "West Garden"), "West Garden - [East Lowlands] Page Behind Ice Dagger House": TunicLocationData("West Garden", "West Garden Portal Item"), "West Garden - [North] Page Pickup": TunicLocationData("West Garden", "West Garden"), "West Garden House - [Southeast Lowlands] Ice Dagger Pickup": TunicLocationData("West Garden", "Magic Dagger House"), - "Hero's Grave - Effigy Relic": TunicLocationData("West Garden", "Hero Relic - West Garden", location_group="hero relic"), + "Hero's Grave - Effigy Relic": TunicLocationData("West Garden", "Hero Relic - West Garden"), } hexagon_locations: Dict[str, str] = { @@ -325,7 +324,7 @@ class TunicLocationData(NamedTuple): location_name_groups: Dict[str, Set[str]] = {} for loc_name, loc_data in location_table.items(): + loc_group_name = loc_name.split(" - ", 1)[0] + location_name_groups.setdefault(loc_group_name, set()).add(loc_name) if loc_data.location_group: - if loc_data.location_group not in location_name_groups.keys(): - location_name_groups[loc_data.location_group] = set() - location_name_groups[loc_data.location_group].add(loc_name) + location_name_groups.setdefault(loc_data.location_group, set()).add(loc_name) From 7bdf9a643c7b6c973467e8acb57cda9c6db6c6a9 Mon Sep 17 00:00:00 2001 From: palex00 <32203971+palex00@users.noreply.github.com> Date: Thu, 2 May 2024 11:56:35 +0200 Subject: [PATCH 137/153] =?UTF-8?q?Updating=20Poptracker-Pack-Link=20for?= =?UTF-8?q?=20Pok=C3=A9mon=20Emerald=20as=20the=20old=20one=20was=20no=20l?= =?UTF-8?q?onger=20maintained=20and=20did=20not=20work=20with=200.4.5=20(#?= =?UTF-8?q?3193)?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit * Replaced the outdated Tracker Pack with a new one that is also pinned in the Discord channel * Same change but for Spanish * Update setup_en.md * catching the bottom link as well * See English Setupguide --- worlds/pokemon_emerald/docs/setup_en.md | 4 ++-- worlds/pokemon_emerald/docs/setup_es.md | 4 ++-- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/worlds/pokemon_emerald/docs/setup_en.md b/worlds/pokemon_emerald/docs/setup_en.md index e3f6d3c3013b..2ae54d5e0c14 100644 --- a/worlds/pokemon_emerald/docs/setup_en.md +++ b/worlds/pokemon_emerald/docs/setup_en.md @@ -21,7 +21,7 @@ clear it. ## Optional Software -- [Pokémon Emerald AP Tracker](https://github.com/AliceMousie/emerald-ap-tracker/releases/latest), for use with +- [Pokémon Emerald AP Tracker](https://github.com/seto10987/Archipelago-Emerald-AP-Tracker/releases/latest), for use with [PopTracker](https://github.com/black-sliver/PopTracker/releases) ## Generating and Patching a Game @@ -64,7 +64,7 @@ perfectly safe to make progress offline; everything will re-sync when you reconn Pokémon Emerald has a fully functional map tracker that supports auto-tracking. -1. Download [Pokémon Emerald AP Tracker](https://github.com/AliceMousie/emerald-ap-tracker/releases/latest) and +1. Download [Pokémon Emerald AP Tracker](https://github.com/seto10987/Archipelago-Emerald-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 Pokémon Emerald pack. diff --git a/worlds/pokemon_emerald/docs/setup_es.md b/worlds/pokemon_emerald/docs/setup_es.md index 65a74a9ddc70..28c3a4a01a65 100644 --- a/worlds/pokemon_emerald/docs/setup_es.md +++ b/worlds/pokemon_emerald/docs/setup_es.md @@ -21,7 +21,7 @@ limpiarlas, selecciona el atajo y presiona la tecla Esc. ## Software Opcional -- [Pokémon Emerald AP Tracker](https://github.com/AliceMousie/emerald-ap-tracker/releases/latest), para usar con +- [Pokémon Emerald AP Tracker](https://github.com/seto10987/Archipelago-Emerald-AP-Tracker/releases/latest), para usar con [PopTracker](https://github.com/black-sliver/PopTracker/releases) ## Generando y Parcheando el Juego @@ -65,7 +65,7 @@ jugar de manera offline; se sincronizará todo cuando te vuelvas a conectar. Pokémon Emerald tiene un Map Tracker completamente funcional que soporta auto-tracking. -1. Descarga [Pokémon Emerald AP Tracker](https://github.com/AliceMousie/emerald-ap-tracker/releases/latest) y +1. Descarga [Pokémon Emerald AP Tracker](https://github.com/seto10987/Archipelago-Emerald-AP-Tracker/releases/latest) y [PopTracker](https://github.com/black-sliver/PopTracker/releases). 2. Coloca la carpeta del Tracker en la carpeta packs/ dentro de la carpeta de instalación del PopTracker. 3. Abre PopTracker, y carga el Pack de Pokémon Emerald Map Tracker. From 31a5696526cab388750916cdd1ffb050f06871b9 Mon Sep 17 00:00:00 2001 From: Scipio Wright Date: Thu, 2 May 2024 06:02:14 -0400 Subject: [PATCH 138/153] Noita: Add more location groups, capitalize existing ones (#3141) * Add location groups for each region * Capitalize existing location groups * Capitalize new boss location group names * Update comment with capitalization * Capitalize location_type in reigons.py --- worlds/noita/locations.py | 127 +++++++++++++++++++------------------- worlds/noita/regions.py | 8 +-- 2 files changed, 69 insertions(+), 66 deletions(-) diff --git a/worlds/noita/locations.py b/worlds/noita/locations.py index 926a502fbca4..5dd87b5b0387 100644 --- a/worlds/noita/locations.py +++ b/worlds/noita/locations.py @@ -12,7 +12,7 @@ class NoitaLocation(Location): class LocationData(NamedTuple): id: int flag: int = 0 - ltype: str = "shop" + ltype: str = "Shop" class LocationFlag(IntEnum): @@ -25,7 +25,7 @@ class LocationFlag(IntEnum): # Mapping of items in each region. # Only the first Hidden Chest and Pedestal are mapped here, the others are created in Regions. -# ltype key: "chest" = Hidden Chests, "pedestal" = Pedestals, "boss" = Boss, "orb" = Orb. +# ltype key: "Chest" = Hidden Chests, "Pedestal" = Pedestals, "Boss" = Boss, "Orb" = Orb. # 110000-110671 location_region_mapping: Dict[str, Dict[str, LocationData]] = { "Coal Pits Holy Mountain": { @@ -91,117 +91,118 @@ class LocationFlag(IntEnum): "Secret Shop Item 4": LocationData(110045), }, "The Sky": { - "Kivi": LocationData(110670, LocationFlag.main_world, "boss"), + "Kivi": LocationData(110670, LocationFlag.main_world, "Boss"), }, "Floating Island": { - "Floating Island Orb": LocationData(110658, LocationFlag.main_path, "orb"), + "Floating Island Orb": LocationData(110658, LocationFlag.main_path, "Orb"), }, "Pyramid": { - "Kolmisilmän Koipi": LocationData(110649, LocationFlag.main_world, "boss"), - "Pyramid Orb": LocationData(110659, LocationFlag.main_world, "orb"), - "Sandcave Orb": LocationData(110662, LocationFlag.main_world, "orb"), + "Kolmisilmän Koipi": LocationData(110649, LocationFlag.main_world, "Boss"), + "Pyramid Orb": LocationData(110659, LocationFlag.main_world, "Orb"), + "Sandcave Orb": LocationData(110662, LocationFlag.main_world, "Orb"), }, "Overgrown Cavern": { - "Overgrown Cavern Chest": LocationData(110526, LocationFlag.main_world, "chest"), - "Overgrown Cavern Pedestal": LocationData(110546, LocationFlag.main_world, "pedestal"), + "Overgrown Cavern Chest": LocationData(110526, LocationFlag.main_world, "Chest"), + "Overgrown Cavern Pedestal": LocationData(110546, LocationFlag.main_world, "Pedestal"), }, "Lake": { - "Syväolento": LocationData(110651, LocationFlag.main_world, "boss"), - "Tapion vasalli": LocationData(110669, LocationFlag.main_world, "boss"), + "Syväolento": LocationData(110651, LocationFlag.main_world, "Boss"), + "Tapion vasalli": LocationData(110669, LocationFlag.main_world, "Boss"), }, "Frozen Vault": { - "Frozen Vault Orb": LocationData(110660, LocationFlag.main_world, "orb"), - "Frozen Vault Chest": LocationData(110566, LocationFlag.main_world, "chest"), - "Frozen Vault Pedestal": LocationData(110586, LocationFlag.main_world, "pedestal"), + "Frozen Vault Orb": LocationData(110660, LocationFlag.main_world, "Orb"), + "Frozen Vault Chest": LocationData(110566, LocationFlag.main_world, "Chest"), + "Frozen Vault Pedestal": LocationData(110586, LocationFlag.main_world, "Pedestal"), }, "Mines": { - "Mines Chest": LocationData(110046, LocationFlag.main_path, "chest"), - "Mines Pedestal": LocationData(110066, LocationFlag.main_path, "pedestal"), + "Mines Chest": LocationData(110046, LocationFlag.main_path, "Chest"), + "Mines Pedestal": LocationData(110066, LocationFlag.main_path, "Pedestal"), }, # Collapsed Mines is a very small area, combining it with the Mines. Leaving this here as a reminder + "Ancient Laboratory": { - "Ylialkemisti": LocationData(110656, LocationFlag.side_path, "boss"), + "Ylialkemisti": LocationData(110656, LocationFlag.side_path, "Boss"), }, "Abyss Orb Room": { - "Sauvojen Tuntija": LocationData(110650, LocationFlag.side_path, "boss"), - "Abyss Orb": LocationData(110665, LocationFlag.main_path, "orb"), + "Sauvojen Tuntija": LocationData(110650, LocationFlag.side_path, "Boss"), + "Abyss Orb": LocationData(110665, LocationFlag.main_path, "Orb"), }, "Below Lava Lake": { - "Lava Lake Orb": LocationData(110661, LocationFlag.side_path, "orb"), + "Lava Lake Orb": LocationData(110661, LocationFlag.side_path, "Orb"), }, "Coal Pits": { - "Coal Pits Chest": LocationData(110126, LocationFlag.main_path, "chest"), - "Coal Pits Pedestal": LocationData(110146, LocationFlag.main_path, "pedestal"), + "Coal Pits Chest": LocationData(110126, LocationFlag.main_path, "Chest"), + "Coal Pits Pedestal": LocationData(110146, LocationFlag.main_path, "Pedestal"), }, "Fungal Caverns": { - "Fungal Caverns Chest": LocationData(110166, LocationFlag.side_path, "chest"), - "Fungal Caverns Pedestal": LocationData(110186, LocationFlag.side_path, "pedestal"), + "Fungal Caverns Chest": LocationData(110166, LocationFlag.side_path, "Chest"), + "Fungal Caverns Pedestal": LocationData(110186, LocationFlag.side_path, "Pedestal"), }, "Snowy Depths": { - "Snowy Depths Chest": LocationData(110206, LocationFlag.main_path, "chest"), - "Snowy Depths Pedestal": LocationData(110226, LocationFlag.main_path, "pedestal"), + "Snowy Depths Chest": LocationData(110206, LocationFlag.main_path, "Chest"), + "Snowy Depths Pedestal": LocationData(110226, LocationFlag.main_path, "Pedestal"), }, "Magical Temple": { - "Magical Temple Orb": LocationData(110663, LocationFlag.side_path, "orb"), + "Magical Temple Orb": LocationData(110663, LocationFlag.side_path, "Orb"), }, "Hiisi Base": { - "Hiisi Base Chest": LocationData(110246, LocationFlag.main_path, "chest"), - "Hiisi Base Pedestal": LocationData(110266, LocationFlag.main_path, "pedestal"), + "Hiisi Base Chest": LocationData(110246, LocationFlag.main_path, "Chest"), + "Hiisi Base Pedestal": LocationData(110266, LocationFlag.main_path, "Pedestal"), }, "Underground Jungle": { - "Suomuhauki": LocationData(110648, LocationFlag.main_path, "boss"), - "Underground Jungle Chest": LocationData(110286, LocationFlag.main_path, "chest"), - "Underground Jungle Pedestal": LocationData(110306, LocationFlag.main_path, "pedestal"), + "Suomuhauki": LocationData(110648, LocationFlag.main_path, "Boss"), + "Underground Jungle Chest": LocationData(110286, LocationFlag.main_path, "Chest"), + "Underground Jungle Pedestal": LocationData(110306, LocationFlag.main_path, "Pedestal"), }, "Lukki Lair": { - "Lukki Lair Orb": LocationData(110664, LocationFlag.side_path, "orb"), - "Lukki Lair Chest": LocationData(110326, LocationFlag.side_path, "chest"), - "Lukki Lair Pedestal": LocationData(110346, LocationFlag.side_path, "pedestal"), + "Lukki Lair Orb": LocationData(110664, LocationFlag.side_path, "Orb"), + "Lukki Lair Chest": LocationData(110326, LocationFlag.side_path, "Chest"), + "Lukki Lair Pedestal": LocationData(110346, LocationFlag.side_path, "Pedestal"), }, "The Vault": { - "The Vault Chest": LocationData(110366, LocationFlag.main_path, "chest"), - "The Vault Pedestal": LocationData(110386, LocationFlag.main_path, "pedestal"), + "The Vault Chest": LocationData(110366, LocationFlag.main_path, "Chest"), + "The Vault Pedestal": LocationData(110386, LocationFlag.main_path, "Pedestal"), }, "Temple of the Art": { - "Gate Guardian": LocationData(110652, LocationFlag.main_path, "boss"), - "Temple of the Art Chest": LocationData(110406, LocationFlag.main_path, "chest"), - "Temple of the Art Pedestal": LocationData(110426, LocationFlag.main_path, "pedestal"), + "Gate Guardian": LocationData(110652, LocationFlag.main_path, "Boss"), + "Temple of the Art Chest": LocationData(110406, LocationFlag.main_path, "Chest"), + "Temple of the Art Pedestal": LocationData(110426, LocationFlag.main_path, "Pedestal"), }, "The Tower": { - "The Tower Chest": LocationData(110606, LocationFlag.main_world, "chest"), - "The Tower Pedestal": LocationData(110626, LocationFlag.main_world, "pedestal"), + "The Tower Chest": LocationData(110606, LocationFlag.main_world, "Chest"), + "The Tower Pedestal": LocationData(110626, LocationFlag.main_world, "Pedestal"), }, "Wizards' Den": { - "Mestarien Mestari": LocationData(110655, LocationFlag.main_world, "boss"), - "Wizards' Den Orb": LocationData(110668, LocationFlag.main_world, "orb"), - "Wizards' Den Chest": LocationData(110446, LocationFlag.main_world, "chest"), - "Wizards' Den Pedestal": LocationData(110466, LocationFlag.main_world, "pedestal"), + "Mestarien Mestari": LocationData(110655, LocationFlag.main_world, "Boss"), + "Wizards' Den Orb": LocationData(110668, LocationFlag.main_world, "Orb"), + "Wizards' Den Chest": LocationData(110446, LocationFlag.main_world, "Chest"), + "Wizards' Den Pedestal": LocationData(110466, LocationFlag.main_world, "Pedestal"), }, "Powerplant": { - "Kolmisilmän silmä": LocationData(110657, LocationFlag.main_world, "boss"), - "Power Plant Chest": LocationData(110486, LocationFlag.main_world, "chest"), - "Power Plant Pedestal": LocationData(110506, LocationFlag.main_world, "pedestal"), + "Kolmisilmän silmä": LocationData(110657, LocationFlag.main_world, "Boss"), + "Power Plant Chest": LocationData(110486, LocationFlag.main_world, "Chest"), + "Power Plant Pedestal": LocationData(110506, LocationFlag.main_world, "Pedestal"), }, "Snow Chasm": { - "Unohdettu": LocationData(110653, LocationFlag.main_world, "boss"), - "Snow Chasm Orb": LocationData(110667, LocationFlag.main_world, "orb"), + "Unohdettu": LocationData(110653, LocationFlag.main_world, "Boss"), + "Snow Chasm Orb": LocationData(110667, LocationFlag.main_world, "Orb"), }, "Meat Realm": { - "Meat Realm Chest": LocationData(110086, LocationFlag.main_world, "chest"), - "Meat Realm Pedestal": LocationData(110106, LocationFlag.main_world, "pedestal"), - "Limatoukka": LocationData(110647, LocationFlag.main_world, "boss"), + "Meat Realm Chest": LocationData(110086, LocationFlag.main_world, "Chest"), + "Meat Realm Pedestal": LocationData(110106, LocationFlag.main_world, "Pedestal"), + "Limatoukka": LocationData(110647, LocationFlag.main_world, "Boss"), }, "West Meat Realm": { - "Kolmisilmän sydän": LocationData(110671, LocationFlag.main_world, "boss"), + "Kolmisilmän sydän": LocationData(110671, LocationFlag.main_world, "Boss"), }, "The Laboratory": { - "Kolmisilmä": LocationData(110646, LocationFlag.main_path, "boss"), + "Kolmisilmä": LocationData(110646, LocationFlag.main_path, "Boss"), }, "Friend Cave": { - "Toveri": LocationData(110654, LocationFlag.main_world, "boss"), + "Toveri": LocationData(110654, LocationFlag.main_world, "Boss"), }, "The Work (Hell)": { - "The Work (Hell) Orb": LocationData(110666, LocationFlag.main_world, "orb"), + "The Work (Hell) Orb": LocationData(110666, LocationFlag.main_world, "Orb"), }, } @@ -212,18 +213,20 @@ def make_location_range(location_name: str, base_id: int, amt: int) -> Dict[str, return {f"{location_name} {i+1}": base_id + i for i in range(amt)} -location_name_groups: Dict[str, Set[str]] = {"shop": set(), "orb": set(), "boss": set(), "chest": set(), - "pedestal": set()} +location_name_groups: Dict[str, Set[str]] = {"Shop": set(), "Orb": set(), "Boss": set(), "Chest": set(), + "Pedestal": set()} location_name_to_id: Dict[str, int] = {} -for location_group in location_region_mapping.values(): +for region_name, location_group in location_region_mapping.items(): + location_name_groups[region_name] = set() for locname, locinfo in location_group.items(): # Iterating the hidden chest and pedestal locations here to avoid clutter above - amount = 20 if locinfo.ltype in ["chest", "pedestal"] else 1 + amount = 20 if locinfo.ltype in ["Chest", "Pedestal"] else 1 entries = make_location_range(locname, locinfo.id, amount) location_name_to_id.update(entries) location_name_groups[locinfo.ltype].update(entries.keys()) + location_name_groups[region_name].update(entries.keys()) shop_locations = {name for name in location_name_to_id.keys() if "Shop Item" in name} diff --git a/worlds/noita/regions.py b/worlds/noita/regions.py index a556b102cc04..184cd96018cf 100644 --- a/worlds/noita/regions.py +++ b/worlds/noita/regions.py @@ -15,14 +15,14 @@ def create_locations(world: "NoitaWorld", region: Region) -> None: location_type = location_data.ltype flag = location_data.flag - is_orb_allowed = location_type == "orb" and flag <= world.options.orbs_as_checks - is_boss_allowed = location_type == "boss" and flag <= world.options.bosses_as_checks + is_orb_allowed = location_type == "Orb" and flag <= world.options.orbs_as_checks + is_boss_allowed = location_type == "Boss" and flag <= world.options.bosses_as_checks amount = 0 if flag == locations.LocationFlag.none or is_orb_allowed or is_boss_allowed: amount = 1 - elif location_type == "chest" and flag <= world.options.path_option: + elif location_type == "Chest" and flag <= world.options.path_option: amount = world.options.hidden_chests.value - elif location_type == "pedestal" and flag <= world.options.path_option: + elif location_type == "Pedestal" and flag <= world.options.path_option: amount = world.options.pedestal_checks.value region.add_locations(locations.make_location_range(location_name, location_data.id, amount), From 3cc434cd78f3a9371a09bb69b43fcace899c69f5 Mon Sep 17 00:00:00 2001 From: ken Date: Thu, 2 May 2024 03:14:50 -0700 Subject: [PATCH 139/153] Core: organize files on ingest via alpha, not ascii (#3029) * organize files on ingest via alpha, not ascii * Change from lower() to casefold() --- Generate.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Generate.py b/Generate.py index d215f39d9dc9..c7ed1ad2d708 100644 --- a/Generate.py +++ b/Generate.py @@ -120,7 +120,7 @@ def main(args=None, callback=ERmain): raise ValueError(f"File {fname} is invalid. Please fix your yaml.") from e # sort dict for consistent results across platforms: - weights_cache = {key: value for key, value in sorted(weights_cache.items())} + weights_cache = {key: value for key, value in sorted(weights_cache.items(), key=lambda k: k[0].casefold())} for filename, yaml_data in weights_cache.items(): if filename not in {args.meta_file_path, args.weights_file_path}: for yaml in yaml_data: From 9d478ba2bc9bc0f5a658725c6fe171ffa028c8fe Mon Sep 17 00:00:00 2001 From: Natalie Weizenbaum Date: Thu, 2 May 2024 03:19:15 -0700 Subject: [PATCH 140/153] Rules: Verify the default values of `Option`s. (#2403) * Verify the default values of `Option`s. Since `Option.verify()` can handle normalization of option names, this allows options to define defaults which rely on that normalization. For example, it allows a world to exclude certain locations by default. This also makes it easier to catch errors if a world author accidentally sets an invalid default. * Update Generate.py Co-authored-by: Doug Hoskisson --------- Co-authored-by: Doug Hoskisson Co-authored-by: NewSoupVi <57900059+NewSoupVi@users.noreply.github.com> --- Generate.py | 14 +++++++------- 1 file changed, 7 insertions(+), 7 deletions(-) diff --git a/Generate.py b/Generate.py index c7ed1ad2d708..1b36c633d8ec 100644 --- a/Generate.py +++ b/Generate.py @@ -409,19 +409,19 @@ def roll_triggers(weights: dict, triggers: list) -> dict: def handle_option(ret: argparse.Namespace, game_weights: dict, option_key: str, option: type(Options.Option), plando_options: PlandoOptions): - if option_key in game_weights: - try: + try: + if option_key in game_weights: if not option.supports_weighting: player_option = option.from_any(game_weights[option_key]) else: player_option = option.from_any(get_choice(option_key, game_weights)) - setattr(ret, option_key, player_option) - except Exception as e: - raise Options.OptionError(f"Error generating option {option_key} in {ret.game}") from e else: - player_option.verify(AutoWorldRegister.world_types[ret.game], ret.name, plando_options) + player_option = option.from_any(option.default) # call the from_any here to support default "random" + setattr(ret, option_key, player_option) + except Exception as e: + raise Options.OptionError(f"Error generating option {option_key} in {ret.game}") from e else: - setattr(ret, option_key, option.from_any(option.default)) # call the from_any here to support default "random" + player_option.verify(AutoWorldRegister.world_types[ret.game], ret.name, plando_options) def roll_settings(weights: dict, plando_options: PlandoOptions = PlandoOptions.bosses): From 8c8b29ae92fae551fd48a2e414e6ca203522d6ec Mon Sep 17 00:00:00 2001 From: Ziktofel Date: Thu, 2 May 2024 12:20:57 +0200 Subject: [PATCH 141/153] SC2: For non-campaign order pick one of the hardest missions as goal (#3180) This allows End Game as the goal even if long campaigns are present --- worlds/sc2/MissionTables.py | 7 +++--- worlds/sc2/PoolFilter.py | 48 +++++++++++++++++++++++++------------ 2 files changed, 36 insertions(+), 19 deletions(-) diff --git a/worlds/sc2/MissionTables.py b/worlds/sc2/MissionTables.py index 99b6448aff35..4dece46411bf 100644 --- a/worlds/sc2/MissionTables.py +++ b/worlds/sc2/MissionTables.py @@ -650,7 +650,7 @@ class SC2CampaignGoal(NamedTuple): SC2Campaign.PROLOGUE: SC2CampaignGoal(SC2Mission.EVIL_AWOKEN, "Evil Awoken: Victory"), SC2Campaign.LOTV: SC2CampaignGoal(SC2Mission.SALVATION, "Salvation: Victory"), SC2Campaign.EPILOGUE: None, - SC2Campaign.NCO: None, + SC2Campaign.NCO: SC2CampaignGoal(SC2Mission.END_GAME, "End Game: Victory"), } campaign_alt_final_mission_locations: Dict[SC2Campaign, Dict[SC2Mission, str]] = { @@ -683,7 +683,6 @@ class SC2CampaignGoal(NamedTuple): SC2Mission.THE_ESSENCE_OF_ETERNITY: "The Essence of Eternity: Victory", }, SC2Campaign.NCO: { - SC2Mission.END_GAME: "End Game: Victory", SC2Mission.FLASHPOINT: "Flashpoint: Victory", SC2Mission.DARK_SKIES: "Dark Skies: Victory", SC2Mission.NIGHT_TERRORS: "Night Terrors: Victory", @@ -709,10 +708,10 @@ def get_goal_location(mission: SC2Mission) -> Union[str, None]: return primary_campaign_goal.location campaign_alt_goals = campaign_alt_final_mission_locations[campaign] - if campaign_alt_goals is not None: + if campaign_alt_goals is not None and mission in campaign_alt_goals: return campaign_alt_goals.get(mission) - return None + return mission.mission_name + ": Victory" def get_campaign_potential_goal_missions(campaign: SC2Campaign) -> List[SC2Mission]: diff --git a/worlds/sc2/PoolFilter.py b/worlds/sc2/PoolFilter.py index e94dc4e214c8..f5f6faa96d62 100644 --- a/worlds/sc2/PoolFilter.py +++ b/worlds/sc2/PoolFilter.py @@ -1,4 +1,4 @@ -from typing import Callable, Dict, List, Set, Union, Tuple +from typing import Callable, Dict, List, Set, Union, Tuple, Optional from BaseClasses import Item, Location from .Items import get_full_item_list, spider_mine_sources, second_pass_placeable_items, progressive_if_nco, \ progressive_if_ext, spear_of_adun_calldowns, spear_of_adun_castable_passives, nova_equipment @@ -69,21 +69,39 @@ def filter_missions(world: World) -> Dict[MissionPools, List[SC2Mission]]: return mission_pools # Finding the goal map - goal_priorities = {campaign: get_campaign_goal_priority(campaign, excluded_missions) for campaign in enabled_campaigns} - goal_level = max(goal_priorities.values()) - candidate_campaigns: List[SC2Campaign] = [campaign for campaign, goal_priority in goal_priorities.items() if goal_priority == goal_level] - candidate_campaigns.sort(key=lambda it: it.id) - goal_campaign = world.random.choice(candidate_campaigns) - primary_goal = campaign_final_mission_locations[goal_campaign] - if primary_goal is None or primary_goal.mission in excluded_missions: - # No primary goal or its mission is excluded - candidate_missions = list(campaign_alt_final_mission_locations[goal_campaign].keys()) - candidate_missions = [mission for mission in candidate_missions if mission not in excluded_missions] - if len(candidate_missions) == 0: - raise Exception("There are no valid goal missions. Please exclude fewer missions.") - goal_mission = world.random.choice(candidate_missions) + goal_mission: Optional[SC2Mission] = None + if mission_order_type in campaign_depending_orders: + # Prefer long campaigns over shorter ones and harder missions over easier ones + goal_priorities = {campaign: get_campaign_goal_priority(campaign, excluded_missions) for campaign in enabled_campaigns} + goal_level = max(goal_priorities.values()) + candidate_campaigns: List[SC2Campaign] = [campaign for campaign, goal_priority in goal_priorities.items() if goal_priority == goal_level] + candidate_campaigns.sort(key=lambda it: it.id) + + goal_campaign = world.random.choice(candidate_campaigns) + primary_goal = campaign_final_mission_locations[goal_campaign] + if primary_goal is None or primary_goal.mission in excluded_missions: + # No primary goal or its mission is excluded + candidate_missions = list(campaign_alt_final_mission_locations[goal_campaign].keys()) + candidate_missions = [mission for mission in candidate_missions if mission not in excluded_missions] + if len(candidate_missions) == 0: + raise Exception("There are no valid goal missions. Please exclude fewer missions.") + goal_mission = world.random.choice(candidate_missions) + else: + goal_mission = primary_goal.mission else: - goal_mission = primary_goal.mission + # Find one of the missions with the hardest difficulty + available_missions: List[SC2Mission] = \ + [mission for mission in SC2Mission + if (mission not in excluded_missions and mission.campaign in enabled_campaigns)] + available_missions.sort(key=lambda it: it.id) + # Loop over pools, from hardest to easiest + for mission_pool in range(MissionPools.VERY_HARD, MissionPools.STARTER - 1, -1): + pool_missions: List[SC2Mission] = [mission for mission in available_missions if mission.pool == mission_pool] + if pool_missions: + goal_mission = world.random.choice(pool_missions) + break + if goal_mission is None: + raise Exception("There are no valid goal missions. Please exclude fewer missions.") # Excluding missions for difficulty, mission_pool in mission_pools.items(): From 0d586a4467d9697d3fc47eaf9064a9ad37695af6 Mon Sep 17 00:00:00 2001 From: Star Rauchenberger Date: Thu, 2 May 2024 08:14:30 -0500 Subject: [PATCH 142/153] Lingo: Fix broken good item in panelsanity (#3249) --- worlds/lingo/player_logic.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/worlds/lingo/player_logic.py b/worlds/lingo/player_logic.py index f7bf1ac99bdd..7019269193c0 100644 --- a/worlds/lingo/player_logic.py +++ b/worlds/lingo/player_logic.py @@ -278,7 +278,7 @@ def __init__(self, world: "LingoWorld"): "iterations. This is very unlikely to happen on its own, and probably indicates some " "kind of logic error.") - if door_shuffle != ShuffleDoors.option_none and location_classification != LocationClassification.insanity \ + if door_shuffle != ShuffleDoors.option_none and location_checks != LocationChecks.option_insanity \ and not early_color_hallways and world.multiworld.players > 1: # Under the combination of door shuffle, normal location checks, and no early color hallways, sphere 1 is # only three checks. In a multiplayer situation, this can be frustrating for the player because they are From 49862dca1f565c8dc7d02d74456f52b43cd75543 Mon Sep 17 00:00:00 2001 From: qwint Date: Thu, 2 May 2024 08:26:17 -0500 Subject: [PATCH 143/153] move godhome events to create_regions with the others to not try and make them non-events when unshuffled is on (#3221) --- worlds/hk/__init__.py | 14 +++++++------- 1 file changed, 7 insertions(+), 7 deletions(-) diff --git a/worlds/hk/__init__.py b/worlds/hk/__init__.py index 4057cded9a5b..1359bea5ce6d 100644 --- a/worlds/hk/__init__.py +++ b/worlds/hk/__init__.py @@ -199,8 +199,14 @@ def create_regions(self): self.multiworld.regions.append(menu_region) # wp_exclusions = self.white_palace_exclusions() + # check for any goal that godhome events are relevant to + all_event_names = event_names.copy() + if self.multiworld.Goal[self.player] in [Goal.option_godhome, Goal.option_godhome_flower]: + from .GodhomeData import godhome_event_names + all_event_names.update(set(godhome_event_names)) + # Link regions - for event_name in event_names: + for event_name in all_event_names: #if event_name in wp_exclusions: # continue loc = HKLocation(self.player, event_name, None, menu_region) @@ -307,12 +313,6 @@ def _add(item_name: str, location_name: str, randomized: bool): randomized = True _add("Elevator_Pass", "Elevator_Pass", randomized) - # check for any goal that godhome events are relevant to - if self.multiworld.Goal[self.player] in [Goal.option_godhome, Goal.option_godhome_flower]: - from .GodhomeData import godhome_event_names - for item_name in godhome_event_names: - _add(item_name, item_name, False) - for shop, locations in self.created_multi_locations.items(): for _ in range(len(locations), getattr(self.multiworld, shop_to_option[shop])[self.player].value): loc = self.create_location(shop) From 255e52642e2b47ad01a40efd7260c461d6322835 Mon Sep 17 00:00:00 2001 From: t3hf1gm3nt <59876300+t3hf1gm3nt@users.noreply.github.com> Date: Thu, 2 May 2024 17:49:39 -0400 Subject: [PATCH 144/153] TLOZ: Fix rings classification, so they are actually considered for logic (#3253) --- worlds/tloz/Items.py | 4 ++-- worlds/tloz/Rules.py | 1 + 2 files changed, 3 insertions(+), 2 deletions(-) diff --git a/worlds/tloz/Items.py b/worlds/tloz/Items.py index d896d11d770b..b421b740012c 100644 --- a/worlds/tloz/Items.py +++ b/worlds/tloz/Items.py @@ -24,7 +24,7 @@ class ItemData(typing.NamedTuple): "Red Candle": ItemData(107, progression), "Book of Magic": ItemData(108, progression), "Magical Key": ItemData(109, useful), - "Red Ring": ItemData(110, useful), + "Red Ring": ItemData(110, progression), "Silver Arrow": ItemData(111, progression), "Sword": ItemData(112, progression), "White Sword": ItemData(113, progression), @@ -37,7 +37,7 @@ class ItemData(typing.NamedTuple): "Food": ItemData(120, progression), "Water of Life (Blue)": ItemData(121, useful), "Water of Life (Red)": ItemData(122, useful), - "Blue Ring": ItemData(123, useful), + "Blue Ring": ItemData(123, progression), "Triforce Fragment": ItemData(124, progression), "Power Bracelet": ItemData(125, useful), "Small Key": ItemData(126, filler), diff --git a/worlds/tloz/Rules.py b/worlds/tloz/Rules.py index ceb1041ba576..39c3b954f0d4 100644 --- a/worlds/tloz/Rules.py +++ b/worlds/tloz/Rules.py @@ -28,6 +28,7 @@ def set_rules(tloz_world: "TLoZWorld"): or location.name not in dangerous_weapon_locations: add_rule(world.get_location(location.name, player), 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), lambda state, hearts=i: state.has("Heart Container", player, hearts) or From b68be7360caf476b5953668eb50e883863f3903d Mon Sep 17 00:00:00 2001 From: t3hf1gm3nt <59876300+t3hf1gm3nt@users.noreply.github.com> Date: Thu, 2 May 2024 20:56:20 -0400 Subject: [PATCH 145/153] [TLOZ]: Remove use of per_slot_randoms (#3255) We only used it in two spots for randomizing the secret rupee cave values. Uses proper world random now. --- worlds/tloz/__init__.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/worlds/tloz/__init__.py b/worlds/tloz/__init__.py index d4bea783a744..7565dc0147ce 100644 --- a/worlds/tloz/__init__.py +++ b/worlds/tloz/__init__.py @@ -260,11 +260,11 @@ def apply_randomizer(self): rom_data[location_id] = item_id # We shuffle the tiers of rupee caves. Caves that shared a value before still will. - secret_caves = self.multiworld.per_slot_randoms[self.player].sample(sorted(secret_money_ids), 3) + secret_caves = self.random.sample(sorted(secret_money_ids), 3) secret_cave_money_amounts = [20, 50, 100] for i, amount in enumerate(secret_cave_money_amounts): # Giving approximately double the money to keep grinding down - amount = amount * self.multiworld.per_slot_randoms[self.player].triangular(1.5, 2.5) + amount = amount * self.random.triangular(1.5, 2.5) secret_cave_money_amounts[i] = int(amount) for i, cave in enumerate(secret_caves): rom_data[secret_money_ids[cave]] = secret_cave_money_amounts[i] From 26188230b74fd7486540149c031650423ceb4227 Mon Sep 17 00:00:00 2001 From: Scipio Wright Date: Fri, 3 May 2024 01:21:27 -0400 Subject: [PATCH 146/153] TUNIC: Better seed groups for Entrance Rando (#2998) * Update entrance rando description to discuss seed groups * Starting off, setting up some names * It lives * Some preliminary plando connection handling, probably has errors * Add missed comma * if -> elif * I think this is working properly to handle plando connections * Update comments * Fix up shop -> shop portal stuff * Add back comma that got removed for no reason in the ladder PR * Remove unnecessary if else * add back the actually necessary if but not the else * okay they were both necessary * Update entrance rando description * blasphemy Co-authored-by: Silent <110704408+silent-destroyer@users.noreply.github.com> * Rename other instances of tunc -> tunic * Update per Vi's review (thank you) * Fix a not that shouldn't have been * Rearrange, update per Vi's comments (thank you) * Fix indent * Add a .value * Add .values * Fix bad comparison * Add a not that was supposed to be there * Replace another isinstance * Revise option description * Fix per Kaito's comment Co-authored-by: Kaito Sinclaire --------- Co-authored-by: Silent <110704408+silent-destroyer@users.noreply.github.com> Co-authored-by: Kaito Sinclaire --- worlds/tunic/__init__.py | 79 ++++++++++++++++++++++++++++++++++++-- worlds/tunic/er_scripts.py | 60 ++++++++++++++++++++--------- worlds/tunic/options.py | 4 +- 3 files changed, 120 insertions(+), 23 deletions(-) diff --git a/worlds/tunic/__init__.py b/worlds/tunic/__init__.py index 356af56ebd3e..20fbd82df2c3 100644 --- a/worlds/tunic/__init__.py +++ b/worlds/tunic/__init__.py @@ -1,6 +1,6 @@ -from typing import Dict, List, Any +from typing import Dict, List, Any, Tuple, TypedDict from logging import warning -from BaseClasses import Region, Location, Item, Tutorial, ItemClassification +from BaseClasses import Region, Location, Item, Tutorial, ItemClassification, MultiWorld from .items import item_name_to_id, item_table, item_name_groups, fool_tiers, filler_items, slot_data_item_names from .locations import location_table, location_name_groups, location_name_to_id, hexagon_locations from .rules import set_location_rules, set_region_rules, randomize_ability_unlocks, gold_hexagon @@ -8,8 +8,9 @@ from .regions import tunic_regions from .er_scripts import create_er_regions from .er_data import portal_mapping -from .options import TunicOptions +from .options import TunicOptions, EntranceRando from worlds.AutoWorld import WebWorld, World +from worlds.generic import PlandoConnection from decimal import Decimal, ROUND_HALF_UP @@ -36,6 +37,13 @@ class TunicLocation(Location): game: str = "TUNIC" +class SeedGroup(TypedDict): + logic_rules: int # logic rules value + laurels_at_10_fairies: bool # laurels location value + fixed_shop: bool # fixed shop value + plando: List[PlandoConnection] # consolidated list of plando connections for the seed group + + class TunicWorld(World): """ Explore a land filled with lost legends, ancient powers, and ferocious monsters in TUNIC, an isometric action game @@ -57,8 +65,21 @@ class TunicWorld(World): slot_data_items: List[TunicItem] tunic_portal_pairs: Dict[str, str] er_portal_hints: Dict[int, str] + seed_groups: Dict[str, SeedGroup] = {} def generate_early(self) -> None: + if self.multiworld.plando_connections[self.player]: + for index, cxn in enumerate(self.multiworld.plando_connections[self.player]): + # making shops second to simplify other things later + if cxn.entrance.startswith("Shop"): + replacement = PlandoConnection(cxn.exit, "Shop Portal", "both") + self.multiworld.plando_connections[self.player].remove(cxn) + self.multiworld.plando_connections[self.player].insert(index, replacement) + elif cxn.exit.startswith("Shop"): + replacement = PlandoConnection(cxn.entrance, "Shop Portal", "both") + self.multiworld.plando_connections[self.player].remove(cxn) + self.multiworld.plando_connections[self.player].insert(index, replacement) + # Universal tracker stuff, shouldn't do anything in standard gen if hasattr(self.multiworld, "re_gen_passthrough"): if "TUNIC" in self.multiworld.re_gen_passthrough: @@ -74,6 +95,58 @@ def generate_early(self) -> None: self.options.entrance_rando.value = passthrough["entrance_rando"] self.options.shuffle_ladders.value = passthrough["shuffle_ladders"] + @classmethod + def stage_generate_early(cls, multiworld: MultiWorld) -> None: + tunic_worlds: Tuple[TunicWorld] = multiworld.get_game_worlds("TUNIC") + for tunic in tunic_worlds: + # if it's one of the options, then it isn't a custom seed group + if tunic.options.entrance_rando.value in EntranceRando.options: + continue + group = tunic.options.entrance_rando.value + # if this is the first world in the group, set the rules equal to its rules + if group not in cls.seed_groups: + cls.seed_groups[group] = SeedGroup(logic_rules=tunic.options.logic_rules.value, + laurels_at_10_fairies=tunic.options.laurels_location == 3, + fixed_shop=bool(tunic.options.fixed_shop), + plando=multiworld.plando_connections[tunic.player]) + continue + + # lower value is more restrictive + if tunic.options.logic_rules.value < cls.seed_groups[group]["logic_rules"]: + cls.seed_groups[group]["logic_rules"] = tunic.options.logic_rules.value + # laurels at 10 fairies changes logic for secret gathering place placement + if tunic.options.laurels_location == 3: + cls.seed_groups[group]["laurels_at_10_fairies"] = True + # fewer shops, one at windmill + if tunic.options.fixed_shop: + cls.seed_groups[group]["fixed_shop"] = True + + if multiworld.plando_connections[tunic.player]: + # loop through the connections in the player's yaml + for cxn in multiworld.plando_connections[tunic.player]: + new_cxn = True + for group_cxn in cls.seed_groups[group]["plando"]: + # if neither entrance nor exit match anything in the group, add to group + if ((cxn.entrance == group_cxn.entrance and cxn.exit == group_cxn.exit) + or (cxn.exit == group_cxn.entrance and cxn.entrance == group_cxn.exit)): + new_cxn = False + break + + # check if this pair is the same as a pair in the group already + is_mismatched = ( + cxn.entrance == group_cxn.entrance and cxn.exit != group_cxn.exit + or cxn.entrance == group_cxn.exit and cxn.exit != group_cxn.entrance + or cxn.exit == group_cxn.entrance and cxn.entrance != group_cxn.exit + or cxn.exit == group_cxn.exit and cxn.entrance != group_cxn.entrance + ) + if is_mismatched: + raise Exception(f"TUNIC: Conflict between seed group {group}'s plando " + f"connection {group_cxn.entrance} <-> {group_cxn.exit} and " + f"{tunic.multiworld.get_player_name(tunic.player)}'s plando " + f"connection {cxn.entrance} <-> {cxn.exit}") + if new_cxn: + cls.seed_groups[group]["plando"].append(cxn) + def create_item(self, name: str) -> TunicItem: item_data = item_table[name] return TunicItem(name, item_data.classification, self.item_name_to_id[name], self.player) diff --git a/worlds/tunic/er_scripts.py b/worlds/tunic/er_scripts.py index 3f70af83c0cc..323ccf421764 100644 --- a/worlds/tunic/er_scripts.py +++ b/worlds/tunic/er_scripts.py @@ -4,6 +4,7 @@ from .er_data import Portal, tunic_er_regions, portal_mapping, \ dependent_regions_restricted, dependent_regions_nmg, dependent_regions_ur from .er_rules import set_er_region_rules +from .options import EntranceRando from worlds.generic import PlandoConnection from random import Random @@ -128,12 +129,21 @@ def pair_portals(world: "TunicWorld") -> Dict[Portal, Portal]: portal_pairs: Dict[Portal, Portal] = {} dead_ends: List[Portal] = [] two_plus: List[Portal] = [] - logic_rules = world.options.logic_rules.value player_name = world.multiworld.get_player_name(world.player) - + logic_rules = world.options.logic_rules.value + fixed_shop = world.options.fixed_shop + laurels_location = world.options.laurels_location + + # if it's not one of the EntranceRando options, it's a custom seed + if world.options.entrance_rando.value not in EntranceRando.options: + seed_group = world.seed_groups[world.options.entrance_rando.value] + logic_rules = seed_group["logic_rules"] + fixed_shop = seed_group["fixed_shop"] + laurels_location = "10_fairies" if seed_group["laurels_at_10_fairies"] is True else False + shop_scenes: Set[str] = set() shop_count = 6 - if world.options.fixed_shop.value: + if fixed_shop: shop_count = 1 shop_scenes.add("Overworld Redux") @@ -163,7 +173,10 @@ def pair_portals(world: "TunicWorld") -> Dict[Portal, Portal]: start_region = "Overworld" connected_regions.update(add_dependent_regions(start_region, logic_rules)) - plando_connections = world.multiworld.plando_connections[world.player] + if world.options.entrance_rando.value in EntranceRando.options: + plando_connections = world.multiworld.plando_connections[world.player] + else: + plando_connections = world.seed_groups[world.options.entrance_rando.value]["plando"] # universal tracker support stuff, don't need to care about region dependency if hasattr(world.multiworld, "re_gen_passthrough"): @@ -198,10 +211,6 @@ def pair_portals(world: "TunicWorld") -> Dict[Portal, Portal]: p_entrance = connection.entrance p_exit = connection.exit - if p_entrance.startswith("Shop"): - p_entrance = p_exit - p_exit = "Shop Portal" - portal1 = None portal2 = None @@ -213,7 +222,18 @@ def pair_portals(world: "TunicWorld") -> Dict[Portal, Portal]: portal2 = portal # search dead_ends individually since we can't really remove items from two_plus during the loop - if not portal1: + if portal1: + two_plus.remove(portal1) + else: + # if not both, they're both dead ends + if not portal2: + if world.options.entrance_rando.value not in EntranceRando.options: + raise Exception(f"Tunic ER seed group {world.options.entrance_rando.value} paired a dead " + "end to a dead end in their plando connections.") + else: + raise Exception(f"{player_name} paired a dead end to a dead end in their " + "plando connections.") + for portal in dead_ends: if p_entrance == portal.name: portal1 = portal @@ -222,16 +242,18 @@ def pair_portals(world: "TunicWorld") -> Dict[Portal, Portal]: raise Exception(f"Could not find entrance named {p_entrance} for " f"plando connections in {player_name}'s YAML.") dead_ends.remove(portal1) - else: - two_plus.remove(portal1) - if not portal2: + if portal2: + two_plus.remove(portal2) + else: + # check if portal2 is a dead end for portal in dead_ends: if p_exit == portal.name: portal2 = portal break - if p_exit in ["Shop Portal", "Shop"]: - portal2 = Portal(name="Shop Portal", region=f"Shop", + # if it's not a dead end, it might be a shop + if p_exit == "Shop Portal": + portal2 = Portal(name="Shop Portal", region="Shop", destination="Previous Region", tag="_") shop_count -= 1 if shop_count < 0: @@ -240,13 +262,12 @@ def pair_portals(world: "TunicWorld") -> Dict[Portal, Portal]: if p.name == p_entrance: shop_scenes.add(p.scene()) break + # and if it's neither shop nor dead end, it just isn't correct else: if not portal2: raise Exception(f"Could not find entrance named {p_exit} for " f"plando connections in {player_name}'s YAML.") dead_ends.remove(portal2) - else: - two_plus.remove(portal2) portal_pairs[portal1] = portal2 @@ -270,7 +291,7 @@ def pair_portals(world: "TunicWorld") -> Dict[Portal, Portal]: # need to plando fairy cave, or it could end up laurels locked # fix this later to be random after adding some item logic to dependent regions - if world.options.laurels_location == "10_fairies" and not hasattr(world.multiworld, "re_gen_passthrough"): + if laurels_location == "10_fairies" and not hasattr(world.multiworld, "re_gen_passthrough"): portal1 = None portal2 = None for portal in two_plus: @@ -291,7 +312,7 @@ def pair_portals(world: "TunicWorld") -> Dict[Portal, Portal]: two_plus.remove(portal1) dead_ends.remove(portal2) - if world.options.fixed_shop and not hasattr(world.multiworld, "re_gen_passthrough"): + if fixed_shop and not hasattr(world.multiworld, "re_gen_passthrough"): portal1 = None for portal in two_plus: if portal.scene_destination() == "Overworld Redux, Windmill_": @@ -307,7 +328,8 @@ def pair_portals(world: "TunicWorld") -> Dict[Portal, Portal]: two_plus.remove(portal1) random_object: Random = world.random - if world.options.entrance_rando.value != 1: + # use the seed given in the options to shuffle the portals + if isinstance(world.options.entrance_rando.value, str): random_object = Random(world.options.entrance_rando.value) # we want to start by making sure every region is accessible random_object.shuffle(two_plus) diff --git a/worlds/tunic/options.py b/worlds/tunic/options.py index 38ddcbe8e40f..9af0a0409c01 100644 --- a/worlds/tunic/options.py +++ b/worlds/tunic/options.py @@ -103,8 +103,10 @@ class ExtraHexagonPercentage(Range): class EntranceRando(TextChoice): """ Randomize the connections between scenes. - If you set this to a value besides true or false, that value will be used as a custom seed. A small, very lost fox on a big adventure. + + If you set this option's value to a string, it will be used as a custom seed. + Every player who uses the same custom seed will have the same entrances, choosing the most restrictive settings among these players for the purpose of pairing entrances. """ internal_name = "entrance_rando" display_name = "Entrance Rando" From 298c9fc1598a4a3d6d8c2dc5510328d80e3f4584 Mon Sep 17 00:00:00 2001 From: Nicholas Saylor <79181893+nicholassaylor@users.noreply.github.com> Date: Fri, 3 May 2024 06:23:08 -0400 Subject: [PATCH 147/153] Fixed typo and odd capitalization (#3233) --- worlds/sm64ex/docs/en_Super Mario 64.md | 14 +++++++------- 1 file changed, 7 insertions(+), 7 deletions(-) diff --git a/worlds/sm64ex/docs/en_Super Mario 64.md b/worlds/sm64ex/docs/en_Super Mario 64.md index 3d182a422081..4c85881a8525 100644 --- a/worlds/sm64ex/docs/en_Super Mario 64.md +++ b/worlds/sm64ex/docs/en_Super Mario 64.md @@ -6,23 +6,23 @@ The player options page for this game contains all the options you need to confi options page link: [SM64EX Player Options Page](../player-options). ## What does randomization do to this game? -All 120 Stars, the 3 Cap Switches, the Basement and Secound Floor Key are now Location Checks and may contain Items for different games as well -as different Items from within SM64. +All 120 Stars, the 3 Cap Switches, the Basement and Second Floor Key are now location checks and may contain items for different games as well +as different items from within SM64. ## What is the goal of SM64EX when randomized? -As in most Mario Games, save the Princess! +As in most Mario games, save the Princess! ## Which items can be in another player's world? Any of the 120 Stars, and the two Castle Keys. Additionally, Cap Switches are also considered "Items" and the "!"-Boxes will only be active -when someone collects the corresponding Cap Switch Item. +when someone collects the corresponding Cap Switch item. ## What does another world's item look like in SM64EX? -The Items are visually unchanged, though after collecting a Message will pop up to inform you what you collected, +The items are visually unchanged, though after collecting a message will pop up to inform you what you collected, and who will receive it. ## When the player receives an item, what happens? -When you receive an Item, a Message will pop up to inform you where you received the Item from, +When you receive an item, a message will pop up to inform you where you received the item from, and which one it is. -NOTE: The Secret Star count in the Menu is broken. +NOTE: The Secret Star count in the menu is broken. From f27d1d635bd71975e23828c591243145c76c73ef Mon Sep 17 00:00:00 2001 From: Fabian Dill Date: Fri, 3 May 2024 22:00:05 +0200 Subject: [PATCH 148/153] SNIClient: restore old operands header (#3242) --- SNIClient.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/SNIClient.py b/SNIClient.py index 9fdddc99a3c3..222ed54f5cc5 100644 --- a/SNIClient.py +++ b/SNIClient.py @@ -565,7 +565,7 @@ async def snes_write(ctx: SNIContext, write_list: typing.List[typing.Tuple[int, PutAddress_Request: SNESRequest = {"Opcode": "PutAddress", "Operands": [], 'Space': 'SNES'} try: for address, data in write_list: - PutAddress_Request['Operands'] = [hex(address)[2:], hex(min(len(data), 256))[2:]] + PutAddress_Request['Operands'] = [hex(address)[2:], hex(len(data))[2:]] if ctx.snes_socket is not None: await ctx.snes_socket.send(dumps(PutAddress_Request)) await ctx.snes_socket.send(data) From d5683c43267bbb8f222937b5d2070515ba6b7087 Mon Sep 17 00:00:00 2001 From: Scipio Wright Date: Fri, 3 May 2024 22:28:09 -0400 Subject: [PATCH 149/153] Core: Make output when hinting something with multiple copies show up in a better order (#3245) * Make the hint info show up in a better order * Change how old_hints is modified/done --------- Co-authored-by: NewSoupVi <57900059+NewSoupVi@users.noreply.github.com> --- MultiServer.py | 16 +++++++--------- 1 file changed, 7 insertions(+), 9 deletions(-) diff --git a/MultiServer.py b/MultiServer.py index 9ee6a8032c1f..f336a523c310 100644 --- a/MultiServer.py +++ b/MultiServer.py @@ -688,7 +688,7 @@ def notify_hints(self, team: int, hints: typing.List[NetUtils.Hint], only_new: b clients = self.clients[team].get(slot) if not clients: continue - client_hints = [datum[1] for datum in sorted(hint_data, key=lambda x: x[0].finding_player == slot)] + client_hints = [datum[1] for datum in sorted(hint_data, key=lambda x: x[0].finding_player != slot)] for client in clients: async_start(self.send_msgs(client, client_hints)) @@ -1529,15 +1529,13 @@ def get_hints(self, input_text: str, for_location: bool = False) -> bool: if hints: new_hints = set(hints) - self.ctx.hints[self.client.team, self.client.slot] - old_hints = set(hints) - new_hints - if old_hints: - self.ctx.notify_hints(self.client.team, list(old_hints)) - if not new_hints: - self.output("Hint was previously used, no points deducted.") + old_hints = list(set(hints) - new_hints) + if old_hints and not new_hints: + self.ctx.notify_hints(self.client.team, old_hints) + self.output("Hint was previously used, no points deducted.") if new_hints: found_hints = [hint for hint in new_hints if hint.found] not_found_hints = [hint for hint in new_hints if not hint.found] - if not not_found_hints: # everything's been found, no need to pay can_pay = 1000 elif cost: @@ -1549,7 +1547,7 @@ def get_hints(self, input_text: str, for_location: bool = False) -> bool: # By popular vote, make hints prefer non-local placements not_found_hints.sort(key=lambda hint: int(hint.receiving_player != hint.finding_player)) - hints = found_hints + hints = found_hints + old_hints while can_pay > 0: if not not_found_hints: break @@ -1559,6 +1557,7 @@ def get_hints(self, input_text: str, for_location: bool = False) -> bool: self.ctx.hints_used[self.client.team, self.client.slot] += 1 points_available = get_client_points(self.ctx, self.client) + self.ctx.notify_hints(self.client.team, hints) if not_found_hints: if hints and cost and int((points_available // cost) == 0): self.output( @@ -1572,7 +1571,6 @@ def get_hints(self, input_text: str, for_location: bool = False) -> bool: self.output(f"You can't afford the hint. " f"You have {points_available} points and need at least " f"{self.ctx.get_hint_cost(self.client.slot)}.") - self.ctx.notify_hints(self.client.team, hints) self.ctx.save() return True From 879c3407d89ea499a1369607e24dcf4fedd350fc Mon Sep 17 00:00:00 2001 From: Thorsten Horberth Date: Sat, 4 May 2024 04:29:12 +0200 Subject: [PATCH 150/153] Yoshi's World: Fixed minor logic inconsistincy in Rules.py (#3241) * Fixed Logic in Rules.py As of easy logic of this goal is set_rule(world.multiworld.get_location("GO! GO! MARIO!!: Stars", player), lambda state: logic.has_midring(state) or (state.has("Tulip", player) and logic.cansee_clouds(state))) normal logic shouldn't need any collectable. * Corrected Logic Rules.py --- worlds/yoshisisland/Rules.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/worlds/yoshisisland/Rules.py b/worlds/yoshisisland/Rules.py index 09f6eaced07c..68d4f29a7381 100644 --- a/worlds/yoshisisland/Rules.py +++ b/worlds/yoshisisland/Rules.py @@ -329,7 +329,7 @@ def set_normal_rules(world: "YoshisIslandWorld") -> None: set_rule(world.multiworld.get_location("GO! GO! MARIO!!: Red Coins", player), lambda state: state.has("Super Star", player)) set_rule(world.multiworld.get_location("GO! GO! MARIO!!: Flowers", player), lambda state: state.has("Super Star", player)) - set_rule(world.multiworld.get_location("GO! GO! MARIO!!: Stars", player), lambda state: state.has("Super Star", player)) + set_rule(world.multiworld.get_location("GO! GO! MARIO!!: Stars", player), lambda state: logic.has_midring(state) or state.has("Tulip", player)) set_rule(world.multiworld.get_location("GO! GO! MARIO!!: Level Clear", player), lambda state: state.has("Super Star", player)) set_rule(world.multiworld.get_location("The Cave Of The Lakitus: Red Coins", player), lambda state: state.has_all({"Large Spring Ball", "! Switch", "Egg Launcher"}, player)) From 660b068f5a11cc6e75e73c835958fe99fb102b01 Mon Sep 17 00:00:00 2001 From: Bryce Wilson Date: Sat, 4 May 2024 00:38:24 -0600 Subject: [PATCH 151/153] Pokemon Emerald: Use OptionError (#3264) --- worlds/pokemon_emerald/__init__.py | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/worlds/pokemon_emerald/__init__.py b/worlds/pokemon_emerald/__init__.py index 92bad6244f96..9071c02da5dc 100644 --- a/worlds/pokemon_emerald/__init__.py +++ b/worlds/pokemon_emerald/__init__.py @@ -9,7 +9,7 @@ from BaseClasses import ItemClassification, MultiWorld, Tutorial, LocationProgressType from Fill import FillError, fill_restrictive -from Options import Toggle +from Options import OptionError, Toggle import settings from worlds.AutoWorld import WebWorld, World @@ -183,8 +183,8 @@ def generate_early(self) -> None: if self.options.goal == Goal.option_legendary_hunt: # Prevent turning off all legendary encounters if len(self.options.allowed_legendary_hunt_encounters.value) == 0: - raise ValueError(f"Pokemon Emerald: Player {self.player} ({self.multiworld.player_name[self.player]}) " - "needs to allow at least one legendary encounter when goal is legendary hunt.") + raise OptionError(f"Pokemon Emerald: Player {self.player} ({self.multiworld.player_name[self.player]}) " + "needs to allow at least one legendary encounter when goal is legendary hunt.") # Prevent setting the number of required legendaries higher than the number of enabled legendaries if self.options.legendary_hunt_count.value > len(self.options.allowed_legendary_hunt_encounters.value): @@ -195,8 +195,8 @@ def generate_early(self) -> None: # Require random wild encounters if dexsanity is enabled if self.options.dexsanity and self.options.wild_pokemon == RandomizeWildPokemon.option_vanilla: - raise ValueError(f"Pokemon Emerald: Player {self.player} ({self.multiworld.player_name[self.player]}) must " - "not leave wild encounters vanilla if enabling dexsanity.") + raise OptionError(f"Pokemon Emerald: Player {self.player} ({self.multiworld.player_name[self.player]}) must " + "not leave wild encounters vanilla if enabling dexsanity.") # If badges or HMs are vanilla, Norman locks you from using Surf, # which means you're not guaranteed to be able to reach Fortree Gym, From 28262a31b8d5cf267ed61b1f6a68d14e0c9010e8 Mon Sep 17 00:00:00 2001 From: Star Rauchenberger Date: Sat, 4 May 2024 01:40:17 -0500 Subject: [PATCH 152/153] Lingo: Started using OptionError (#3251) --- worlds/lingo/__init__.py | 12 +++++++----- worlds/lingo/player_logic.py | 11 ++++++----- 2 files changed, 13 insertions(+), 10 deletions(-) diff --git a/worlds/lingo/__init__.py b/worlds/lingo/__init__.py index 537b149f16ed..113c3928d21c 100644 --- a/worlds/lingo/__init__.py +++ b/worlds/lingo/__init__.py @@ -4,6 +4,7 @@ from logging import warning from BaseClasses import Item, ItemClassification, Tutorial +from Options import OptionError from worlds.AutoWorld import WebWorld, World from .datatypes import Room, RoomEntrance from .items import ALL_ITEM_TABLE, ITEMS_BY_GROUP, TRAP_ITEMS, LingoItem @@ -52,13 +53,14 @@ class LingoWorld(World): player_logic: LingoPlayerLogic def generate_early(self): - if not (self.options.shuffle_doors or self.options.shuffle_colors): + if not (self.options.shuffle_doors or self.options.shuffle_colors or self.options.shuffle_sunwarps): if self.multiworld.players == 1: warning(f"{self.multiworld.get_player_name(self.player)}'s Lingo world doesn't have any progression" - f" items. Please turn on Door Shuffle or Color Shuffle if that doesn't seem right.") + f" items. Please turn on Door Shuffle, Color Shuffle, or Sunwarp Shuffle if that doesn't seem" + f" right.") else: - raise Exception(f"{self.multiworld.get_player_name(self.player)}'s Lingo world doesn't have any" - f" progression items. Please turn on Door Shuffle or Color Shuffle.") + raise OptionError(f"{self.multiworld.get_player_name(self.player)}'s Lingo world doesn't have any" + f" progression items. Please turn on Door Shuffle, Color Shuffle or Sunwarp Shuffle.") self.player_logic = LingoPlayerLogic(self) @@ -94,7 +96,7 @@ def create_items(self): total_weight = sum(self.options.trap_weights.values()) if total_weight == 0: - raise Exception("Sum of trap weights must be at least one.") + raise OptionError("Sum of trap weights must be at least one.") trap_counts = {name: int(weight * traps / total_weight) for name, weight in self.options.trap_weights.items()} diff --git a/worlds/lingo/player_logic.py b/worlds/lingo/player_logic.py index 7019269193c0..19583bc8228b 100644 --- a/worlds/lingo/player_logic.py +++ b/worlds/lingo/player_logic.py @@ -1,6 +1,7 @@ from enum import Enum from typing import Dict, List, NamedTuple, Optional, Set, Tuple, TYPE_CHECKING +from Options import OptionError from .datatypes import Door, DoorType, RoomAndDoor, RoomAndPanel from .items import ALL_ITEM_TABLE, ItemType from .locations import ALL_LOCATION_TABLE, LocationClassification @@ -149,8 +150,8 @@ def __init__(self, world: "LingoWorld"): early_color_hallways = world.options.early_color_hallways if location_checks == LocationChecks.option_reduced and door_shuffle != ShuffleDoors.option_none: - raise Exception("You cannot have reduced location checks when door shuffle is on, because there would not " - "be enough locations for all of the door items.") + raise OptionError("You cannot have reduced location checks when door shuffle is on, because there would not" + " be enough locations for all of the door items.") # Create door items, where needed. door_groups: Set[str] = set() @@ -219,7 +220,7 @@ def __init__(self, world: "LingoWorld"): self.event_loc_to_item[self.level_2_location] = "Victory" if world.options.level_2_requirement == 1: - raise Exception("The Level 2 requirement must be at least 2 when LEVEL 2 is the victory condition.") + raise OptionError("The Level 2 requirement must be at least 2 when LEVEL 2 is the victory condition.") elif victory_condition == VictoryCondition.option_pilgrimage: self.victory_condition = "Pilgrim Antechamber - PILGRIM" self.add_location("Pilgrim Antechamber", "PILGRIM (Solved)", None, @@ -248,11 +249,11 @@ def __init__(self, world: "LingoWorld"): self.real_locations.append(location_name) if world.options.enable_pilgrimage and world.options.sunwarp_access == SunwarpAccess.option_disabled: - raise Exception("Sunwarps cannot be disabled when pilgrimage is enabled.") + raise OptionError("Sunwarps cannot be disabled when pilgrimage is enabled.") if world.options.shuffle_sunwarps: if world.options.sunwarp_access == SunwarpAccess.option_disabled: - raise Exception("Sunwarps cannot be shuffled if they are disabled.") + raise OptionError("Sunwarps cannot be shuffled if they are disabled.") self.sunwarp_mapping = list(range(0, 12)) world.random.shuffle(self.sunwarp_mapping) From 005fc4e864fe73c972030e2929979561fbad4155 Mon Sep 17 00:00:00 2001 From: Aaron Wagener Date: Sat, 4 May 2024 05:42:36 -0500 Subject: [PATCH 153/153] Fill: allow for single player fill restrictive placement and sweeping (#2415) * Core: allow for single player state sweeping * Fill: have distribute items use single_player fill when it can * oop * pass locations to sweep_for_events instead of the player * finally found the diff that was breaking swap * LTTP fills everyone's dungeons at once, not just a single player's --------- Co-authored-by: NewSoupVi <57900059+NewSoupVi@users.noreply.github.com> --- Fill.py | 22 +++++++++++++++------- worlds/alttp/Dungeons.py | 2 +- 2 files changed, 16 insertions(+), 8 deletions(-) diff --git a/Fill.py b/Fill.py index e65f027408c1..d9919c133847 100644 --- a/Fill.py +++ b/Fill.py @@ -19,11 +19,12 @@ def _log_fill_progress(name: str, placed: int, total_items: int) -> None: logging.info(f"Current fill step ({name}) at {placed}/{total_items} items placed.") -def sweep_from_pool(base_state: CollectionState, itempool: typing.Sequence[Item] = tuple()) -> CollectionState: +def sweep_from_pool(base_state: CollectionState, itempool: typing.Sequence[Item] = tuple(), + locations: typing.Optional[typing.List[Location]] = None) -> CollectionState: new_state = base_state.copy() for item in itempool: new_state.collect(item, True) - new_state.sweep_for_events() + new_state.sweep_for_events(locations=locations) return new_state @@ -66,7 +67,8 @@ def fill_restrictive(multiworld: MultiWorld, base_state: CollectionState, locati item_pool.pop(p) break maximum_exploration_state = sweep_from_pool( - base_state, item_pool + unplaced_items) + base_state, item_pool + unplaced_items, multiworld.get_filled_locations(item.player) + if single_player_placement else None) has_beaten_game = multiworld.has_beaten_game(maximum_exploration_state) @@ -112,7 +114,9 @@ def fill_restrictive(multiworld: MultiWorld, base_state: CollectionState, locati location.item = None placed_item.location = None - swap_state = sweep_from_pool(base_state, [placed_item, *item_pool] if unsafe else item_pool) + swap_state = sweep_from_pool(base_state, [placed_item, *item_pool] if unsafe else item_pool, + multiworld.get_filled_locations(item.player) + if single_player_placement else None) # unsafe means swap_state assumes we can somehow collect placed_item before item_to_place # by continuing to swap, which is not guaranteed. This is unsafe because there is no mechanic # to clean that up later, so there is a chance generation fails. @@ -170,7 +174,9 @@ def fill_restrictive(multiworld: MultiWorld, base_state: CollectionState, locati if cleanup_required: # validate all placements and remove invalid ones - state = sweep_from_pool(base_state, []) + state = sweep_from_pool( + base_state, [], multiworld.get_filled_locations(item.player) + if single_player_placement else None) for placement in placements: if multiworld.worlds[placement.item.player].options.accessibility != "minimal" and not placement.can_reach(state): placement.item.location = None @@ -456,14 +462,16 @@ def mark_for_locking(location: Location): if prioritylocations: # "priority fill" - fill_restrictive(multiworld, multiworld.state, prioritylocations, progitempool, swap=False, on_place=mark_for_locking, + fill_restrictive(multiworld, multiworld.state, prioritylocations, progitempool, + single_player_placement=multiworld.players == 1, swap=False, on_place=mark_for_locking, name="Priority") accessibility_corrections(multiworld, multiworld.state, prioritylocations, progitempool) defaultlocations = prioritylocations + defaultlocations if progitempool: # "advancement/progression fill" - fill_restrictive(multiworld, multiworld.state, defaultlocations, progitempool, name="Progression") + fill_restrictive(multiworld, multiworld.state, defaultlocations, progitempool, single_player_placement=multiworld.players == 1, + name="Progression") if progitempool: raise FillError( f"Not enough locations for progression items. " diff --git a/worlds/alttp/Dungeons.py b/worlds/alttp/Dungeons.py index f0b8c2d971b0..150d52cc6c58 100644 --- a/worlds/alttp/Dungeons.py +++ b/worlds/alttp/Dungeons.py @@ -264,7 +264,7 @@ def fill_dungeons_restrictive(multiworld: MultiWorld): if loc in all_state_base.events: all_state_base.events.remove(loc) - fill_restrictive(multiworld, all_state_base, locations, in_dungeon_items, True, True, allow_excluded=True, + fill_restrictive(multiworld, all_state_base, locations, in_dungeon_items, lock=True, allow_excluded=True, name="LttP Dungeon Items")