From 4e5c10ad66673662488b63f0538dd0501198415d Mon Sep 17 00:00:00 2001 From: espeon65536 <81029175+espeon65536@users.noreply.github.com> Date: Wed, 9 Nov 2022 15:07:14 -0600 Subject: [PATCH] OoT: make Bottles and Adult Trade Item hintable groups (#1222) * OoT: make Bottles and Adult Trade Item hintable groups --- test/general/TestItems.py | 2 ++ worlds/oot/Rules.py | 2 +- worlds/oot/__init__.py | 36 +++++++++++++++++++++++------------- 3 files changed, 26 insertions(+), 14 deletions(-) diff --git a/test/general/TestItems.py b/test/general/TestItems.py index 3dd58999..cee95b71 100644 --- a/test/general/TestItems.py +++ b/test/general/TestItems.py @@ -19,6 +19,8 @@ class TestBase(unittest.TestCase): exclusion_dict = { "A Link to the Past": {"Pendants", "Crystals"}, + "Ocarina of Time": + {"medallions", "stones", "rewards", "logic_bottles"}, "Starcraft 2 Wings of Liberty": {"Missions"}, } diff --git a/worlds/oot/Rules.py b/worlds/oot/Rules.py index 3f7a2fa1..1ad4d9e4 100644 --- a/worlds/oot/Rules.py +++ b/worlds/oot/Rules.py @@ -22,7 +22,7 @@ class OOTLogic(LogicMixin): return self.has_group("rewards", player, count) def _oot_has_bottle(self, player): - return self.has_group("bottles", player) + return self.has_group("logic_bottles", player) # Used for fall damage and other situations where damage is unavoidable def _oot_can_live_dmg(self, player, hearts): diff --git a/worlds/oot/__init__.py b/worlds/oot/__init__.py index 78042578..98136fc8 100644 --- a/worlds/oot/__init__.py +++ b/worlds/oot/__init__.py @@ -110,6 +110,29 @@ class OOTWorld(World): required_client_version = (0, 3, 2) + item_name_groups = { + # internal groups + "medallions": {"Light Medallion", "Forest Medallion", "Fire Medallion", + "Water Medallion", "Shadow Medallion", "Spirit Medallion"}, + "stones": {"Kokiri Emerald", "Goron Ruby", "Zora Sapphire"}, + "rewards": {"Light Medallion", "Forest Medallion", "Fire Medallion", + "Water Medallion", "Shadow Medallion", "Spirit Medallion", + "Kokiri Emerald", "Goron Ruby", "Zora Sapphire"}, + "logic_bottles": {"Bottle", "Bottle with Milk", "Deliver Letter", + "Sell Big Poe", "Bottle with Red Potion", "Bottle with Green Potion", + "Bottle with Blue Potion", "Bottle with Fairy", "Bottle with Fish", + "Bottle with Blue Fire", "Bottle with Bugs", "Bottle with Poe"}, + + # hint groups + "Bottles": {"Bottle", "Bottle with Milk", "Rutos Letter", + "Bottle with Big Poe", "Bottle with Red Potion", "Bottle with Green Potion", + "Bottle with Blue Potion", "Bottle with Fairy", "Bottle with Fish", + "Bottle with Blue Fire", "Bottle with Bugs", "Bottle with Poe"}, + "Adult Trade Item": {"Pocket Egg", "Pocket Cucco", "Odd Mushroom", + "Odd Potion", "Poachers Saw", "Broken Sword", "Prescription", + "Eyeball Frog", "Eyedrops", "Claim Check"} + } + def __init__(self, world, player): self.hint_data_available = threading.Event() super(OOTWorld, self).__init__(world, player) @@ -141,19 +164,6 @@ class OOTWorld(World): self.file_hash = [self.multiworld.random.randint(0, 31) for i in range(5)] self.connect_name = ''.join(self.multiworld.random.choices(printable, k=16)) - self.item_name_groups = { - "medallions": {"Light Medallion", "Forest Medallion", "Fire Medallion", "Water Medallion", - "Shadow Medallion", "Spirit Medallion"}, - "stones": {"Kokiri Emerald", "Goron Ruby", "Zora Sapphire"}, - "rewards": {"Light Medallion", "Forest Medallion", "Fire Medallion", "Water Medallion", "Shadow Medallion", - "Spirit Medallion", \ - "Kokiri Emerald", "Goron Ruby", "Zora Sapphire"}, - "bottles": {"Bottle", "Bottle with Milk", "Deliver Letter", "Sell Big Poe", "Bottle with Red Potion", - "Bottle with Green Potion", \ - "Bottle with Blue Potion", "Bottle with Fairy", "Bottle with Fish", "Bottle with Blue Fire", - "Bottle with Bugs", "Bottle with Poe"} - } - # Incompatible option handling # ER and glitched logic are not compatible; glitched takes priority if self.logic_rules == 'glitched':