LADX: Fix D6 keylogic (#1585)

* fix keylogic for d6

* markup required keys for keylogic

* add test

* Update __init__.py
This commit is contained in:
zig-for
2023-03-24 16:23:42 -07:00
committed by GitHub
parent 0386d9f6d2
commit 77b2ed54a6
3 changed files with 41 additions and 2 deletions

View File

@@ -0,0 +1,35 @@
from . import LADXTestBase
from ..Items import ItemName
class TestD6(LADXTestBase):
# Force keys into pool for testing
options = {
"shuffle_small_keys": "any_world"
}
def test_keylogic(self):
keys = self.get_items_by_name(ItemName.KEY6)
self.collect_by_name([ItemName.FACE_KEY, ItemName.HOOKSHOT, ItemName.POWER_BRACELET, ItemName.BOMB, ItemName.FEATHER, ItemName.FLIPPERS])
# Can reach an un-keylocked item in the dungeon
self.assertTrue(self.can_reach_location("L2 Bracelet Chest (Face Shrine)"))
# For each location, add a key and check that the right thing unlocks
location_1 = "Tile Room Key (Face Shrine)"
location_2 = "Top Right Horse Heads Chest (Face Shrine)"
location_3 = "Pot Locked Chest (Face Shrine)"
self.assertFalse(self.can_reach_location(location_1))
self.assertFalse(self.can_reach_location(location_2))
self.assertFalse(self.can_reach_location(location_3))
self.collect(keys[0])
self.assertTrue(self.can_reach_location(location_1))
self.assertFalse(self.can_reach_location(location_2))
self.assertFalse(self.can_reach_location(location_3))
self.collect(keys[1])
self.assertTrue(self.can_reach_location(location_1))
self.assertTrue(self.can_reach_location(location_2))
self.assertFalse(self.can_reach_location(location_3))
self.collect(keys[2])
self.assertTrue(self.can_reach_location(location_1))
self.assertTrue(self.can_reach_location(location_2))
self.assertTrue(self.can_reach_location(location_3))