예제 #1
0
 def test_ice_traps(self):
     filenames = [
         "plando-item-pool-matches-items-placed-after-starting-items-replaced",
         "plando-new-placed-ice-traps",
         "plando-placed-and-added-ice-traps",
         "non-standard-visible-ice-traps",
     ]
     for filename in filenames:
         with self.subTest(filename):
             distribution_file, spoiler = generate_with_plandomizer(filename)
             csmc = spoiler['settings'].get('correct_chest_sizes')
             for location in spoiler['locations']:
                 if location_is_viewable(location, csmc):
                     item = spoiler['locations'][location]
                     if isinstance(item, dict):
                         if item['item'] == "Ice Trap":
                             self.assertIn("model", item)
                     else:
                         self.assertNotIn("Ice Trap", item)
             if filename == "plando-item-pool-matches-items-placed-after-starting-items-replaced":
                 with self.subTest("ice traps not junk with junk ice traps off"):
                     self.assertEqual(spoiler['item_pool']['Ice Trap'], 6)
                 with self.subTest("ice traps junk with junk ice traps on"):
                     # This distribution file should set all junk items to 1 except for ice traps so we will reuse it
                     _, spoiler = generate_with_plandomizer("plando-explicit-item-pool")
                     self.assertGreater(spoiler['item_pool']['Ice Trap'], 6)
             if filename == "non-standard-visible-ice-traps":
                 with self.subTest("ice trap models in non-standard visible locations"):
                     for location in distribution_file['locations']:
                         self.assertIn('model', spoiler['locations'][location])
예제 #2
0
 def has_preview(self):
     return location_is_viewable(
         self.name, self.world.settings.correct_chest_appearances)
예제 #3
0
 def has_preview(self):
     return location_is_viewable(self.name, self.world.correct_chest_sizes)