| 
									
										
										
										
											2023-03-21 15:21:27 -05:00
										 |  |  | from BaseClasses import ItemClassification | 
					
						
							|  |  |  | from . import MessengerTestBase | 
					
						
							|  |  |  | 
 | 
					
						
							|  |  |  | 
 | 
					
						
							|  |  |  | class HardLogicTest(MessengerTestBase): | 
					
						
							|  |  |  |     options = { | 
					
						
							| 
									
										
										
										
											2023-04-03 19:27:36 -05:00
										 |  |  |         "logic_level": "hard", | 
					
						
							| 
									
										
										
										
											2023-09-30 05:35:07 -05:00
										 |  |  |         "shuffle_shards": "true", | 
					
						
							| 
									
										
										
										
											2023-03-21 15:21:27 -05:00
										 |  |  |     } | 
					
						
							|  |  |  | 
 | 
					
						
							| 
									
										
										
										
											2023-10-08 07:33:39 -05:00
										 |  |  |     def test_vertical(self) -> None: | 
					
						
							| 
									
										
										
										
											2023-03-21 15:21:27 -05:00
										 |  |  |         """Test the locations that still require wingsuit or rope dart.""" | 
					
						
							|  |  |  |         locations = [ | 
					
						
							|  |  |  |             # tower of time | 
					
						
							| 
									
										
										
										
											2023-06-27 18:39:52 -05:00
										 |  |  |             "Tower of Time Seal - Time Waster", "Tower of Time Seal - Lantern Climb", | 
					
						
							| 
									
										
										
										
											2023-03-21 15:21:27 -05:00
										 |  |  |             "Tower of Time Seal - Arcane Orbs", | 
					
						
							|  |  |  |             # ninja village | 
					
						
							| 
									
										
										
										
											2023-06-27 18:39:52 -05:00
										 |  |  |             "Ninja Village - Candle", "Ninja Village - Astral Seed", "Ninja Village Seal - Tree House", | 
					
						
							| 
									
										
										
										
											2023-03-21 15:21:27 -05:00
										 |  |  |             # autumn hills | 
					
						
							| 
									
										
										
										
											2023-06-27 18:39:52 -05:00
										 |  |  |             "Autumn Hills - Climbing Claws", "Autumn Hills - Key of Hope", "Autumn Hills - Leaf Golem", | 
					
						
							| 
									
										
										
										
											2023-03-21 15:21:27 -05:00
										 |  |  |             "Autumn Hills Seal - Trip Saws", "Autumn Hills Seal - Double Swing Saws", | 
					
						
							|  |  |  |             "Autumn Hills Seal - Spike Ball Swing", "Autumn Hills Seal - Spike Ball Darts", | 
					
						
							| 
									
										
										
										
											2023-09-30 05:35:07 -05:00
										 |  |  |             "Autumn Hills Mega Shard", "Hidden Entrance Mega Shard", | 
					
						
							| 
									
										
										
										
											2023-03-21 15:21:27 -05:00
										 |  |  |             # forlorn temple | 
					
						
							| 
									
										
										
										
											2023-06-27 18:39:52 -05:00
										 |  |  |             "Forlorn Temple - Demon King", | 
					
						
							| 
									
										
										
										
											2023-03-21 15:21:27 -05:00
										 |  |  |             "Forlorn Temple Seal - Rocket Maze", "Forlorn Temple Seal - Rocket Sunset", | 
					
						
							| 
									
										
										
										
											2023-09-30 05:35:07 -05:00
										 |  |  |             "Sunny Day Mega Shard", "Down Under Mega Shard", | 
					
						
							| 
									
										
										
										
											2023-03-21 15:21:27 -05:00
										 |  |  |             # catacombs | 
					
						
							| 
									
										
										
										
											2023-06-27 18:39:52 -05:00
										 |  |  |             "Catacombs - Necro", "Catacombs - Ruxxtin's Amulet", "Catacombs - Ruxxtin", | 
					
						
							| 
									
										
										
										
											2023-03-21 15:21:27 -05:00
										 |  |  |             "Catacombs Seal - Triple Spike Crushers", "Catacombs Seal - Crusher Gauntlet", "Catacombs Seal - Dirty Pond", | 
					
						
							| 
									
										
										
										
											2023-09-30 05:35:07 -05:00
										 |  |  |             "Catacombs Mega Shard", | 
					
						
							| 
									
										
										
										
											2023-03-21 15:21:27 -05:00
										 |  |  |             # bamboo creek | 
					
						
							| 
									
										
										
										
											2023-06-27 18:39:52 -05:00
										 |  |  |             "Bamboo Creek - Claustro", | 
					
						
							| 
									
										
										
										
											2023-03-21 15:21:27 -05:00
										 |  |  |             "Bamboo Creek Seal - Spike Crushers and Doors", "Bamboo Creek Seal - Spike Ball Pits", | 
					
						
							|  |  |  |             "Bamboo Creek Seal - Spike Crushers and Doors v2", | 
					
						
							| 
									
										
										
										
											2023-09-30 05:35:07 -05:00
										 |  |  |             "Above Entrance Mega Shard", "Abandoned Mega Shard", "Time Loop Mega Shard", | 
					
						
							| 
									
										
										
										
											2023-03-21 15:21:27 -05:00
										 |  |  |             # howling grotto | 
					
						
							| 
									
										
										
										
											2023-06-27 18:39:52 -05: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 15:21:27 -05:00
										 |  |  |             # cloud ruins | 
					
						
							| 
									
										
										
										
											2023-06-27 18:39:52 -05:00
										 |  |  |             "Cloud Ruins - Acro", "Cloud Ruins Seal - Ghost Pit", | 
					
						
							| 
									
										
										
										
											2023-03-21 15:21:27 -05:00
										 |  |  |             "Cloud Ruins Seal - Toothbrush Alley", "Cloud Ruins Seal - Saw Pit", "Cloud Ruins Seal - Money Farm Room", | 
					
						
							| 
									
										
										
										
											2024-03-11 17:23:41 -05:00
										 |  |  |             "Money Farm Room Mega Shard 1", "Money Farm Room Mega Shard 2", | 
					
						
							| 
									
										
										
										
											2023-03-21 15:21:27 -05:00
										 |  |  |             # underworld | 
					
						
							|  |  |  |             "Underworld Seal - Rising Fanta", "Underworld Seal - Sharp and Windy Climb", | 
					
						
							|  |  |  |             # elemental skylands | 
					
						
							| 
									
										
										
										
											2023-04-06 03:48:30 -05:00
										 |  |  |             "Elemental Skylands Seal - Air", | 
					
						
							| 
									
										
										
										
											2023-03-21 15:21:27 -05:00
										 |  |  |             # phantom | 
					
						
							|  |  |  |             "Rescue Phantom", | 
					
						
							|  |  |  |         ] | 
					
						
							|  |  |  |         items = [["Wingsuit", "Rope Dart"]] | 
					
						
							|  |  |  |         self.assertAccessDependency(locations, items) | 
					
						
							|  |  |  | 
 | 
					
						
							| 
									
										
										
										
											2023-10-08 07:33:39 -05:00
										 |  |  |     def test_windmill(self) -> None: | 
					
						
							| 
									
										
										
										
											2023-03-21 15:21:27 -05:00
										 |  |  |         """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 18:39:52 -05:00
										 |  |  |             "Searing Crags - Key of Strength", | 
					
						
							|  |  |  |             "Elemental Skylands - Key of Symbiosis", | 
					
						
							| 
									
										
										
										
											2023-04-03 19:27:36 -05:00
										 |  |  |             "Underworld Seal - Fireball Wave", | 
					
						
							| 
									
										
										
										
											2023-03-21 15:21:27 -05: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 18:39:52 -05:00
										 |  |  |         items = self.get_items_by_name(["Windmill Shuriken", "Lightfoot Tabi", "Magic Firefly"]) | 
					
						
							| 
									
										
										
										
											2023-03-21 15:21:27 -05: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)) | 
					
						
							| 
									
										
										
										
											2023-10-08 07:33:39 -05:00
										 |  |  | 
 | 
					
						
							| 
									
										
										
										
											2023-03-21 15:21:27 -05:00
										 |  |  | 
 | 
					
						
							|  |  |  | class NoLogicTest(MessengerTestBase): | 
					
						
							|  |  |  |     options = { | 
					
						
							| 
									
										
										
										
											2023-04-03 19:27:36 -05:00
										 |  |  |         "logic_level": "oob", | 
					
						
							| 
									
										
										
										
											2023-03-21 15:21:27 -05:00
										 |  |  |     } | 
					
						
							|  |  |  | 
 | 
					
						
							| 
									
										
										
										
											2023-10-08 07:33:39 -05:00
										 |  |  |     def test_access(self) -> None: | 
					
						
							| 
									
										
										
										
											2023-03-21 15:21:27 -05:00
										 |  |  |         """Test the locations with rules still require things.""" | 
					
						
							|  |  |  |         all_locations = [ | 
					
						
							| 
									
										
										
										
											2023-06-27 18:39:52 -05: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 15:21:27 -05:00
										 |  |  |         ] | 
					
						
							|  |  |  |         for loc in all_locations: | 
					
						
							|  |  |  |             with self.subTest("Default unreachables", location=loc): | 
					
						
							|  |  |  |                 self.assertFalse(self.can_reach_location(loc)) |