2023-03-21 20:21:27 +00:00
|
|
|
from BaseClasses import ItemClassification
|
|
|
|
from . import MessengerTestBase
|
|
|
|
|
|
|
|
|
|
|
|
class HardLogicTest(MessengerTestBase):
|
|
|
|
options = {
|
2023-04-04 00:27:36 +00:00
|
|
|
"logic_level": "hard",
|
2023-03-21 20:21:27 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
def testVertical(self) -> None:
|
|
|
|
"""Test the locations that still require wingsuit or rope dart."""
|
|
|
|
locations = [
|
|
|
|
# tower of time
|
2023-06-27 23:39:52 +00:00
|
|
|
"Tower of Time Seal - Time Waster", "Tower of Time Seal - Lantern Climb",
|
2023-03-21 20:21:27 +00:00
|
|
|
"Tower of Time Seal - Arcane Orbs",
|
|
|
|
# ninja village
|
2023-06-27 23:39:52 +00:00
|
|
|
"Ninja Village - Candle", "Ninja Village - Astral Seed", "Ninja Village Seal - Tree House",
|
2023-03-21 20:21:27 +00:00
|
|
|
# autumn hills
|
2023-06-27 23:39:52 +00:00
|
|
|
"Autumn Hills - Climbing Claws", "Autumn Hills - Key of Hope", "Autumn Hills - Leaf Golem",
|
2023-03-21 20:21:27 +00:00
|
|
|
"Autumn Hills Seal - Trip Saws", "Autumn Hills Seal - Double Swing Saws",
|
|
|
|
"Autumn Hills Seal - Spike Ball Swing", "Autumn Hills Seal - Spike Ball Darts",
|
|
|
|
# forlorn temple
|
2023-06-27 23:39:52 +00:00
|
|
|
"Forlorn Temple - Demon King",
|
2023-03-21 20:21:27 +00:00
|
|
|
"Forlorn Temple Seal - Rocket Maze", "Forlorn Temple Seal - Rocket Sunset",
|
|
|
|
# catacombs
|
2023-06-27 23:39:52 +00:00
|
|
|
"Catacombs - Necro", "Catacombs - Ruxxtin's Amulet", "Catacombs - Ruxxtin",
|
2023-03-21 20:21:27 +00:00
|
|
|
"Catacombs Seal - Triple Spike Crushers", "Catacombs Seal - Crusher Gauntlet", "Catacombs Seal - Dirty Pond",
|
|
|
|
# bamboo creek
|
2023-06-27 23:39:52 +00:00
|
|
|
"Bamboo Creek - Claustro",
|
2023-03-21 20:21:27 +00:00
|
|
|
"Bamboo Creek Seal - Spike Crushers and Doors", "Bamboo Creek Seal - Spike Ball Pits",
|
|
|
|
"Bamboo Creek Seal - Spike Crushers and Doors v2",
|
|
|
|
# howling grotto
|
2023-06-27 23:39:52 +00:00
|
|
|
"Howling Grotto - Emerald Golem", "Howling Grotto Seal - Crushing Pits", "Howling Grotto Seal - Crushing Pits",
|
|
|
|
# searing crags
|
|
|
|
"Searing Crags - Astral Tea Leaves",
|
2023-03-21 20:21:27 +00:00
|
|
|
# cloud ruins
|
2023-06-27 23:39:52 +00:00
|
|
|
"Cloud Ruins - Acro", "Cloud Ruins Seal - Ghost Pit",
|
2023-03-21 20:21:27 +00:00
|
|
|
"Cloud Ruins Seal - Toothbrush Alley", "Cloud Ruins Seal - Saw Pit", "Cloud Ruins Seal - Money Farm Room",
|
|
|
|
# underworld
|
|
|
|
"Underworld Seal - Rising Fanta", "Underworld Seal - Sharp and Windy Climb",
|
|
|
|
# elemental skylands
|
2023-04-06 08:48:30 +00:00
|
|
|
"Elemental Skylands Seal - Air",
|
2023-03-21 20:21:27 +00:00
|
|
|
# phantom
|
|
|
|
"Rescue Phantom",
|
|
|
|
]
|
|
|
|
items = [["Wingsuit", "Rope Dart"]]
|
|
|
|
self.assertAccessDependency(locations, items)
|
|
|
|
|
|
|
|
def testWindmill(self) -> None:
|
|
|
|
"""Windmill Shuriken isn't progression on normal difficulty, so test it's marked correctly and required."""
|
|
|
|
self.assertEqual(ItemClassification.progression, self.get_item_by_name("Windmill Shuriken").classification)
|
|
|
|
windmill_locs = [
|
2023-06-27 23:39:52 +00:00
|
|
|
"Searing Crags - Key of Strength",
|
|
|
|
"Elemental Skylands - Key of Symbiosis",
|
2023-04-04 00:27:36 +00:00
|
|
|
"Underworld Seal - Fireball Wave",
|
2023-03-21 20:21:27 +00:00
|
|
|
]
|
|
|
|
for loc in windmill_locs:
|
|
|
|
with self.subTest("can't reach location with nothing", location=loc):
|
|
|
|
self.assertFalse(self.can_reach_location(loc))
|
|
|
|
|
2023-06-27 23:39:52 +00:00
|
|
|
items = self.get_items_by_name(["Windmill Shuriken", "Lightfoot Tabi", "Magic Firefly"])
|
2023-03-21 20:21:27 +00:00
|
|
|
self.collect(items)
|
|
|
|
for loc in windmill_locs:
|
|
|
|
with self.subTest("can reach with Windmill", location=loc):
|
|
|
|
self.assertTrue(self.can_reach_location(loc))
|
|
|
|
|
|
|
|
special_loc = "Autumn Hills Seal - Spike Ball Darts"
|
|
|
|
item = self.get_item_by_name("Wingsuit")
|
|
|
|
self.collect(item)
|
|
|
|
self.assertTrue(self.can_reach_location(special_loc))
|
|
|
|
self.remove(item)
|
|
|
|
|
|
|
|
item = self.get_item_by_name("Rope Dart")
|
|
|
|
self.collect(item)
|
|
|
|
self.assertTrue(self.can_reach_location(special_loc))
|
|
|
|
|
|
|
|
|
|
|
|
class NoLogicTest(MessengerTestBase):
|
|
|
|
options = {
|
2023-04-04 00:27:36 +00:00
|
|
|
"logic_level": "oob",
|
2023-03-21 20:21:27 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
def testAccess(self) -> None:
|
|
|
|
"""Test the locations with rules still require things."""
|
|
|
|
all_locations = [
|
2023-06-27 23:39:52 +00:00
|
|
|
"Bamboo Creek - Claustro", "Searing Crags - Key of Strength", "Elemental Skylands - Key of Symbiosis",
|
|
|
|
"Sunken Shrine - Key of Love", "Searing Crags - Pyro", "Underworld - Key of Chaos",
|
|
|
|
"Corrupted Future - Key of Courage", "Autumn Hills Seal - Spike Ball Darts",
|
|
|
|
"Ninja Village Seal - Tree House", "Underworld Seal - Fireball Wave", "Tower of Time Seal - Time Waster",
|
|
|
|
"Rescue Phantom", "Elemental Skylands Seal - Air", "Elemental Skylands Seal - Water",
|
|
|
|
"Elemental Skylands Seal - Fire",
|
2023-03-21 20:21:27 +00:00
|
|
|
]
|
|
|
|
for loc in all_locations:
|
|
|
|
with self.subTest("Default unreachables", location=loc):
|
|
|
|
self.assertFalse(self.can_reach_location(loc))
|
|
|
|
self.assertBeatable(True)
|