From fe6096464cc242818697eedfdea2dca0a000fedc Mon Sep 17 00:00:00 2001 From: Aaron Wagener Date: Sat, 30 Sep 2023 05:35:07 -0500 Subject: [PATCH] The Messenger: fix rules for two glacial peak locations (#2234) * The Messenger: fix rules for two glacial peak locations --- worlds/messenger/Rules.py | 9 ++++----- worlds/messenger/test/TestLogic.py | 20 ++++++++++++++++++++ 2 files changed, 24 insertions(+), 5 deletions(-) diff --git a/worlds/messenger/Rules.py b/worlds/messenger/Rules.py index b72d454a7e0f..c24f60fbaadb 100644 --- a/worlds/messenger/Rules.py +++ b/worlds/messenger/Rules.py @@ -182,8 +182,10 @@ def __init__(self, world: MessengerWorld) -> None: "Searing Crags Seal - Raining Rocks": lambda state: self.has_vertical(state) or self.can_destroy_projectiles(state), "Searing Crags Seal - Rhythm Rocks": lambda state: self.has_vertical(state) or self.can_destroy_projectiles(state), "Searing Crags - Power Thistle": lambda state: self.has_vertical(state) or self.can_destroy_projectiles(state), - "Glacial Peak Seal - Ice Climbers": self.has_vertical, + "Glacial Peak Seal - Ice Climbers": lambda state: self.has_vertical(state) or self.can_dboost(state), "Glacial Peak Seal - Projectile Spike Pit": self.true, + "Glacial Peak Seal - Glacial Air Swag": lambda state: self.has_windmill(state) or self.has_vertical(state), + "Glacial Peak Mega Shard": lambda state: self.has_windmill(state) or self.has_vertical(state), "Cloud Ruins Seal - Ghost Pit": self.true, "Bamboo Creek - Claustro": self.has_wingsuit, "Tower of Time Seal - Lantern Climb": self.has_wingsuit, @@ -201,10 +203,7 @@ def __init__(self, world: MessengerWorld) -> None: "Elemental Skylands - Key of Symbiosis": lambda state: self.has_windmill(state) or self.can_dboost(state), "Autumn Hills Seal - Spike Ball Darts": lambda state: (self.has_dart(state) and self.has_windmill(state)) or self.has_wingsuit(state), - "Glacial Peak Seal - Glacial Air Swag": self.has_windmill, - "Glacial Peak Seal - Ice Climbers": lambda state: self.has_wingsuit(state) or self.can_dboost(state), - "Underworld Seal - Fireball Wave": lambda state: state.has_all({"Lightfoot Tabi", "Windmill Shuriken"}, - self.player), + "Underworld Seal - Fireball Wave": self.has_windmill, } def has_windmill(self, state: CollectionState) -> bool: diff --git a/worlds/messenger/test/TestLogic.py b/worlds/messenger/test/TestLogic.py index 45b0d0dab629..932bc1386701 100644 --- a/worlds/messenger/test/TestLogic.py +++ b/worlds/messenger/test/TestLogic.py @@ -1,3 +1,5 @@ +from typing import Iterable, List + from BaseClasses import ItemClassification from . import MessengerTestBase @@ -5,6 +7,7 @@ class HardLogicTest(MessengerTestBase): options = { "logic_level": "hard", + "shuffle_shards": "true", } def testVertical(self) -> None: @@ -19,16 +22,20 @@ def testVertical(self) -> None: "Autumn Hills - Climbing Claws", "Autumn Hills - Key of Hope", "Autumn Hills - Leaf Golem", "Autumn Hills Seal - Trip Saws", "Autumn Hills Seal - Double Swing Saws", "Autumn Hills Seal - Spike Ball Swing", "Autumn Hills Seal - Spike Ball Darts", + "Autumn Hills Mega Shard", "Hidden Entrance Mega Shard", # forlorn temple "Forlorn Temple - Demon King", "Forlorn Temple Seal - Rocket Maze", "Forlorn Temple Seal - Rocket Sunset", + "Sunny Day Mega Shard", "Down Under Mega Shard", # catacombs "Catacombs - Necro", "Catacombs - Ruxxtin's Amulet", "Catacombs - Ruxxtin", "Catacombs Seal - Triple Spike Crushers", "Catacombs Seal - Crusher Gauntlet", "Catacombs Seal - Dirty Pond", + "Catacombs Mega Shard", # bamboo creek "Bamboo Creek - Claustro", "Bamboo Creek Seal - Spike Crushers and Doors", "Bamboo Creek Seal - Spike Ball Pits", "Bamboo Creek Seal - Spike Crushers and Doors v2", + "Above Entrance Mega Shard", "Abandoned Mega Shard", "Time Loop Mega Shard", # howling grotto "Howling Grotto - Emerald Golem", "Howling Grotto Seal - Crushing Pits", "Howling Grotto Seal - Crushing Pits", # searing crags @@ -36,6 +43,7 @@ def testVertical(self) -> None: # cloud ruins "Cloud Ruins - Acro", "Cloud Ruins Seal - Ghost Pit", "Cloud Ruins Seal - Toothbrush Alley", "Cloud Ruins Seal - Saw Pit", "Cloud Ruins Seal - Money Farm Room", + "Cloud Entrance Mega Shard", "Time Warp Mega Shard", "Money Farm Room Mega Shard 1", "Money Farm Room Mega Shard 2", # underworld "Underworld Seal - Rising Fanta", "Underworld Seal - Sharp and Windy Climb", # elemental skylands @@ -73,6 +81,18 @@ def testWindmill(self) -> None: item = self.get_item_by_name("Rope Dart") self.collect(item) self.assertTrue(self.can_reach_location(special_loc)) + + def testGlacial(self) -> None: + """Test Glacial Peak locations.""" + self.assertAccessDependency(["Glacial Peak Seal - Ice Climbers"], + [["Second Wind", "Meditation"], ["Rope Dart"], ["Wingsuit"]], + True) + self.assertAccessDependency(["Glacial Peak Seal - Projectile Spike Pit"], + [["Strike of the Ninja"], ["Windmill Shuriken"], ["Rope Dart"], ["Wingsuit"]], + True) + self.assertAccessDependency(["Glacial Peak Seal - Glacial Air Swag", "Glacial Peak Mega Shard"], + [["Windmill Shuriken"], ["Wingsuit"], ["Rope Dart"]], + True) class NoLogicTest(MessengerTestBase):