 332eab9569
			
		
	
	332eab9569
	
	
	
		
			
			* add shop shuffle options and items * add logic for the shop slots * write cost tests * start on shop item logic * make strike and second wind early items * some cleanup * remove 5 shards * double cost requirement for really expensive items and raise the rates * add test for shop shuffle with minimum other locations * put power seal in front of shards * rename locations and items * update rules, regions, and shop * update tests and misc fixes * minor cleanup * implement money wrench and figurines * clean out now unneeded info from slot_data * docs update and fix a failure when not shuffling shops * remove shop shuffle option * Finish out shop rules * make seals generation easier to read and fix tests * rule adjustments * oop * adjust the prices to be a bit more generous * add max price to slot data for tracker * update the hard rules a bit * remove unnecessary test * update data_version * bump version and remove info for fixed issues * remove now unneeded assert * review updates * minor bug fix * add a test for minimum locations shop costing * minor optimizations and cleanup * remove whitespace
		
			
				
	
	
		
			97 lines
		
	
	
		
			4.5 KiB
		
	
	
	
		
			Python
		
	
	
	
	
	
			
		
		
	
	
			97 lines
		
	
	
		
			4.5 KiB
		
	
	
	
		
			Python
		
	
	
	
	
	
| from BaseClasses import ItemClassification
 | |
| from . import MessengerTestBase
 | |
| 
 | |
| 
 | |
| class HardLogicTest(MessengerTestBase):
 | |
|     options = {
 | |
|         "logic_level": "hard",
 | |
|     }
 | |
| 
 | |
|     def testVertical(self) -> None:
 | |
|         """Test the locations that still require wingsuit or rope dart."""
 | |
|         locations = [
 | |
|             # tower of time
 | |
|             "Tower of Time Seal - Time Waster", "Tower of Time Seal - Lantern Climb",
 | |
|             "Tower of Time Seal - Arcane Orbs",
 | |
|             # ninja village
 | |
|             "Ninja Village - Candle", "Ninja Village - Astral Seed", "Ninja Village Seal - Tree House",
 | |
|             # autumn hills
 | |
|             "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",
 | |
|             # forlorn temple
 | |
|             "Forlorn Temple - Demon King",
 | |
|             "Forlorn Temple Seal - Rocket Maze", "Forlorn Temple Seal - Rocket Sunset",
 | |
|             # catacombs
 | |
|             "Catacombs - Necro", "Catacombs - Ruxxtin's Amulet", "Catacombs - Ruxxtin",
 | |
|             "Catacombs Seal - Triple Spike Crushers", "Catacombs Seal - Crusher Gauntlet", "Catacombs Seal - Dirty Pond",
 | |
|             # 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",
 | |
|             # howling grotto
 | |
|             "Howling Grotto - Emerald Golem", "Howling Grotto Seal - Crushing Pits", "Howling Grotto Seal - Crushing Pits",
 | |
|             # searing crags
 | |
|             "Searing Crags - Astral Tea Leaves",
 | |
|             # 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",
 | |
|             # underworld
 | |
|             "Underworld Seal - Rising Fanta", "Underworld Seal - Sharp and Windy Climb",
 | |
|             # elemental skylands
 | |
|             "Elemental Skylands Seal - Air",
 | |
|             # 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 = [
 | |
|             "Searing Crags - Key of Strength",
 | |
|             "Elemental Skylands - Key of Symbiosis",
 | |
|             "Underworld Seal - Fireball Wave",
 | |
|         ]
 | |
|         for loc in windmill_locs:
 | |
|             with self.subTest("can't reach location with nothing", location=loc):
 | |
|                 self.assertFalse(self.can_reach_location(loc))
 | |
| 
 | |
|         items = self.get_items_by_name(["Windmill Shuriken", "Lightfoot Tabi", "Magic Firefly"])
 | |
|         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 = {
 | |
|         "logic_level": "oob",
 | |
|     }
 | |
| 
 | |
|     def testAccess(self) -> None:
 | |
|         """Test the locations with rules still require things."""
 | |
|         all_locations = [
 | |
|             "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",
 | |
|         ]
 | |
|         for loc in all_locations:
 | |
|             with self.subTest("Default unreachables", location=loc):
 | |
|                 self.assertFalse(self.can_reach_location(loc))
 | |
|         self.assertBeatable(True)
 |