mirror of
https://github.com/MarioSpore/Grinch-AP.git
synced 2025-10-21 12:11:33 -06:00
Core: Add new ItemClassification "deprioritized" which will not be placed on priority locations (if possible) (#4610)
* Add new deprioritized item flag * 4 retries * indent * . * style * I think this is nicer * Nicer * remove two lines again that I added unnecessarily * I think this test makes a bit more sense like this * Idk how to word this lol * Add progression_deprioritized_skip_balancing bc why not ig * More text * Update Fill.py * Update Fill.py * I am the big stupid * Actually collect the other half of progression items into state when filling without them * More clarity on the descriptions (hopefully) * visually separate technical description and use cases * Actually make the call do what the comments say it does
This commit is contained in:
@@ -603,6 +603,28 @@ class TestDistributeItemsRestrictive(unittest.TestCase):
|
||||
self.assertTrue(player3.locations[2].item.advancement)
|
||||
self.assertTrue(player3.locations[3].item.advancement)
|
||||
|
||||
def test_deprioritized_does_not_land_on_priority(self):
|
||||
multiworld = generate_test_multiworld(1)
|
||||
player1 = generate_player_data(multiworld, 1, 2, prog_item_count=2)
|
||||
|
||||
player1.prog_items[0].classification |= ItemClassification.deprioritized
|
||||
player1.locations[0].progress_type = LocationProgressType.PRIORITY
|
||||
|
||||
distribute_items_restrictive(multiworld)
|
||||
|
||||
self.assertFalse(player1.locations[0].item.deprioritized)
|
||||
|
||||
def test_deprioritized_still_goes_on_priority_ahead_of_filler(self):
|
||||
multiworld = generate_test_multiworld(1)
|
||||
player1 = generate_player_data(multiworld, 1, 2, prog_item_count=1, basic_item_count=1)
|
||||
|
||||
player1.prog_items[0].classification |= ItemClassification.deprioritized
|
||||
player1.locations[0].progress_type = LocationProgressType.PRIORITY
|
||||
|
||||
distribute_items_restrictive(multiworld)
|
||||
|
||||
self.assertTrue(player1.locations[0].item.advancement)
|
||||
|
||||
def test_can_remove_locations_in_fill_hook(self):
|
||||
"""Test that distribute_items_restrictive calls the fill hook and allows for item and location removal"""
|
||||
multiworld = generate_test_multiworld()
|
||||
|
Reference in New Issue
Block a user