From 9d70a8c19d8c7afe380f3318f5cc5f8b8c3a0bff Mon Sep 17 00:00:00 2001 From: codemann8 Date: Sun, 23 May 2021 23:20:20 -0500 Subject: [PATCH] Update TestSuite with OW shuffle options --- TestSuite.py | 1 + test-options.py | 2 +- test/dungeons/TestDungeon.py | 2 +- test/inverted/TestInverted.py | 4 ++- test/inverted/TestInvertedBombRules.py | 8 ++--- test/inverted/TestInvertedDarkWorld.py | 4 --- test/inverted/TestInvertedEntrances.py | 42 ++++++++++++++------------ test/inverted_owg/TestDarkWorld.py | 4 --- test/inverted_owg/TestDungeons.py | 3 +- test/inverted_owg/TestInvertedOWG.py | 4 ++- test/owg/TestLightWorld.py | 13 -------- test/owg/TestVanillaOWG.py | 4 ++- test/vanilla/TestLightWorld.py | 13 -------- test/vanilla/TestVanilla.py | 4 ++- 14 files changed, 42 insertions(+), 66 deletions(-) diff --git a/TestSuite.py b/TestSuite.py index ede5ae53..355c1883 100644 --- a/TestSuite.py +++ b/TestSuite.py @@ -52,6 +52,7 @@ def main(args=None): test("Crossed ", "--shuffle crossed") test("Insanity ", "--shuffle insanity") test("OWG ", "--logic owglitches") + test("OW Full ", "--ow_shuffle full") from tqdm import tqdm with tqdm(concurrent.futures.as_completed(task_mapping), diff --git a/test-options.py b/test-options.py index 60386860..324d38c6 100644 --- a/test-options.py +++ b/test-options.py @@ -86,7 +86,7 @@ if __name__ == "__main__": compiledOptions = {} notebooks = { - "randomize": [ "dungeon", "enemizer", "entrando", "gameoptions", "generation", "item", "multiworld" ] + "randomize": [ "dungeon", "enemizer", "overworld", "entrando", "gameoptions", "generation", "item", "multiworld" ] } for notebook in notebooks: for page in notebooks[notebook]: diff --git a/test/dungeons/TestDungeon.py b/test/dungeons/TestDungeon.py index 1eb3cc7b..78cf4e57 100644 --- a/test/dungeons/TestDungeon.py +++ b/test/dungeons/TestDungeon.py @@ -11,7 +11,7 @@ from Rules import set_rules class TestDungeon(unittest.TestCase): def setUp(self): - self.world = World(1, 'vanilla', 'noglitches', 'open', 'random', 'normal', 'normal', 'none', 'on', 'ganon', 'balanced', + self.world = World(1, 'vanilla', 'vanilla', 'vanilla', 'noglitches', 'open', 'random', 'normal', 'normal', 'none', 'on', 'ganon', 'balanced', True, False, False, False, False, False, False, False, False, None, 'none', False) self.starting_regions = [] diff --git a/test/inverted/TestInverted.py b/test/inverted/TestInverted.py index 9fba6b95..3097f4b7 100644 --- a/test/inverted/TestInverted.py +++ b/test/inverted/TestInverted.py @@ -2,6 +2,7 @@ from BaseClasses import World from DoorShuffle import link_doors from Doors import create_doors from Dungeons import create_dungeons, get_dungeon_item_pool +from OverworldShuffle import link_overworld from EntranceShuffle import link_inverted_entrances from ItemList import generate_itempool, difficulties from Items import ItemFactory @@ -13,7 +14,7 @@ from test.TestBase import TestBase class TestInverted(TestBase): def setUp(self): - self.world = World(1, {1: 'vanilla'}, {1: 'vanilla'}, {1: 'noglitches'}, {1: 'inverted'}, {1: 'random'}, {1: 'normal'}, {1: 'normal'}, 'none', 'on', {1: 'ganon'}, 'balanced', {1: 'items'}, + self.world = World(1, {1: 'vanilla'}, {1: 'vanilla'}, {1: 'vanilla'}, {1: 'noglitches'}, {1: 'inverted'}, {1: 'random'}, {1: 'normal'}, {1: 'normal'}, 'none', 'on', {1: 'ganon'}, 'balanced', {1: 'items'}, {1: True}, {1: False}, False, None, {1: False}) self.world.difficulty_requirements[1] = difficulties['normal'] self.world.intensity = {1: 1} @@ -23,6 +24,7 @@ class TestInverted(TestBase): create_doors(self.world, 1) create_rooms(self.world, 1) create_dungeons(self.world, 1) + link_overworld(self.world, 1) link_inverted_entrances(self.world, 1) link_doors(self.world, 1) generate_itempool(self.world, 1) diff --git a/test/inverted/TestInvertedBombRules.py b/test/inverted/TestInvertedBombRules.py index 9ce3c546..acd32157 100644 --- a/test/inverted/TestInvertedBombRules.py +++ b/test/inverted/TestInvertedBombRules.py @@ -19,8 +19,8 @@ class TestInvertedBombRules(TestInverted): if entrance_name not in ['Desert Palace Entrance (East)', 'Spectacle Rock Cave', 'Spectacle Rock Cave (Bottom)']: entrance = self.world.get_entrance(entrance_name, 1) entrance.connected_region = None - self.world.get_region('Inverted Big Bomb Shop', 1).entrances = [] - connect_entrance(self.world, entrance, 'Inverted Big Bomb Shop', 1) + self.world.get_region('Big Bomb Shop', 1).entrances = [] + connect_entrance(self.world, entrance, 'Links House', 1) set_inverted_big_bomb_rules(self.world, 1) entrance.connected_region.entrances.remove(entrance) entrance.connected_region = None @@ -34,8 +34,8 @@ class TestInvertedBombRules(TestInverted): def testInvalidEntrances(self): for entrance_name in ['Desert Palace Entrance (East)', 'Spectacle Rock Cave', 'Spectacle Rock Cave (Bottom)']: entrance = self.world.get_entrance(entrance_name, 1) - self.world.get_region('Inverted Big Bomb Shop', 1).entrances = [] - connect_entrance(self.world, entrance, 'Inverted Big Bomb Shop', 1) + self.world.get_region('Big Bomb Shop', 1).entrances = [] + connect_entrance(self.world, entrance, 'Links House', 1) with self.assertRaises(Exception): set_inverted_big_bomb_rules(self.world, 1) entrance.connected_region.entrances.remove(entrance) diff --git a/test/inverted/TestInvertedDarkWorld.py b/test/inverted/TestInvertedDarkWorld.py index 58a4c8b1..951434eb 100644 --- a/test/inverted/TestInvertedDarkWorld.py +++ b/test/inverted/TestInvertedDarkWorld.py @@ -82,13 +82,9 @@ class TestInvertedDeathMountain(TestInverted): def testSouth(self): self.run_location_tests([ ["Hype Cave - Top", True, []], - ["Hype Cave - Middle Right", True, []], - ["Hype Cave - Middle Left", True, []], - ["Hype Cave - Bottom", True, []], - ["Hype Cave - Generous Guy", True, []], ["Stumpy", True, []], diff --git a/test/inverted/TestInvertedEntrances.py b/test/inverted/TestInvertedEntrances.py index 89b3e000..b0b20479 100644 --- a/test/inverted/TestInvertedEntrances.py +++ b/test/inverted/TestInvertedEntrances.py @@ -49,15 +49,16 @@ class TestEntrances(TestInverted): ["Tower of Hera", True, ["Moon Pearl", "Hammer", "Hookshot", "Progressive Glove", "Ocarina"]], ["Tower of Hera", True, ["Moon Pearl", "Hammer", "Beat Agahnim 1", "Ocarina", "Hookshot"]], - ["Inverted Agahnims Tower", False, []], - ["Inverted Agahnims Tower", False, [], ["Ocarina", "Lamp"]], - ["Inverted Agahnims Tower", False, [], ["Ocarina", "Progressive Glove"]], - ["Inverted Agahnims Tower", False, [], ["Moon Pearl", "Lamp"]], - ["Inverted Agahnims Tower", False, [], ["Moon Pearl", "Progressive Glove"]], - ["Inverted Agahnims Tower", True, ["Lamp", "Progressive Glove"]], - ["Inverted Agahnims Tower", True, ["Ocarina", "Beat Agahnim 1", "Moon Pearl"]], - ["Inverted Agahnims Tower", True, ["Ocarina", "Progressive Glove", "Progressive Glove", "Moon Pearl"]], - ["Inverted Agahnims Tower", True, ["Ocarina", "Progressive Glove", "Hammer", "Moon Pearl"]], + # Agahnim's Tower (Inverted) + ["Ganons Tower", False, []], + ["Ganons Tower", False, [], ["Ocarina", "Lamp"]], + ["Ganons Tower", False, [], ["Ocarina", "Progressive Glove"]], + ["Ganons Tower", False, [], ["Moon Pearl", "Lamp"]], + ["Ganons Tower", False, [], ["Moon Pearl", "Progressive Glove"]], + ["Ganons Tower", True, ["Lamp", "Progressive Glove"]], + ["Ganons Tower", True, ["Ocarina", "Beat Agahnim 1", "Moon Pearl"]], + ["Ganons Tower", True, ["Ocarina", "Progressive Glove", "Progressive Glove", "Moon Pearl"]], + ["Ganons Tower", True, ["Ocarina", "Progressive Glove", "Hammer", "Moon Pearl"]], ["Palace of Darkness", False, []], ["Palace of Darkness", False, [], ["Hammer", "Flippers", "Magic Mirror", "Ocarina"]], @@ -104,15 +105,16 @@ class TestEntrances(TestInverted): ["Turtle Rock", True, ["Quake", "Progressive Sword", "Progressive Glove", "Hammer", "Moon Pearl", "Ocarina"]], ["Turtle Rock", True, ["Quake", "Progressive Sword", "Beat Agahnim 1", "Moon Pearl", "Ocarina"]], - ["Inverted Ganons Tower", False, []], - ["Inverted Ganons Tower", False, [], ["Crystal 1"]], - ["Inverted Ganons Tower", False, [], ["Crystal 2"]], - ["Inverted Ganons Tower", False, [], ["Crystal 3"]], - ["Inverted Ganons Tower", False, [], ["Crystal 4"]], - ["Inverted Ganons Tower", False, [], ["Crystal 5"]], - ["Inverted Ganons Tower", False, [], ["Crystal 6"]], - ["Inverted Ganons Tower", False, [], ["Crystal 7"]], - ["Inverted Ganons Tower", True, ["Beat Agahnim 1", "Crystal 1", "Crystal 2", "Crystal 3", "Crystal 4", "Crystal 5", "Crystal 6", "Crystal 7"]], - ["Inverted Ganons Tower", True, ["Moon Pearl", "Progressive Glove", "Progressive Glove", "Crystal 1", "Crystal 2", "Crystal 3", "Crystal 4", "Crystal 5", "Crystal 6", "Crystal 7"]], - ["Inverted Ganons Tower", True, ["Moon Pearl", "Hammer", "Progressive Glove", "Progressive Glove", "Crystal 1", "Crystal 2", "Crystal 3", "Crystal 4", "Crystal 5", "Crystal 6", "Crystal 7"]], + # Ganon's Tower (Inverted) + ["Agahnims Tower", False, []], + ["Agahnims Tower", False, [], ["Crystal 1"]], + ["Agahnims Tower", False, [], ["Crystal 2"]], + ["Agahnims Tower", False, [], ["Crystal 3"]], + ["Agahnims Tower", False, [], ["Crystal 4"]], + ["Agahnims Tower", False, [], ["Crystal 5"]], + ["Agahnims Tower", False, [], ["Crystal 6"]], + ["Agahnims Tower", False, [], ["Crystal 7"]], + ["Agahnims Tower", True, ["Beat Agahnim 1", "Crystal 1", "Crystal 2", "Crystal 3", "Crystal 4", "Crystal 5", "Crystal 6", "Crystal 7"]], + ["Agahnims Tower", True, ["Moon Pearl", "Progressive Glove", "Progressive Glove", "Crystal 1", "Crystal 2", "Crystal 3", "Crystal 4", "Crystal 5", "Crystal 6", "Crystal 7"]], + ["Agahnims Tower", True, ["Moon Pearl", "Hammer", "Progressive Glove", "Progressive Glove", "Crystal 1", "Crystal 2", "Crystal 3", "Crystal 4", "Crystal 5", "Crystal 6", "Crystal 7"]], ]) \ No newline at end of file diff --git a/test/inverted_owg/TestDarkWorld.py b/test/inverted_owg/TestDarkWorld.py index 89dff120..9803470f 100644 --- a/test/inverted_owg/TestDarkWorld.py +++ b/test/inverted_owg/TestDarkWorld.py @@ -6,13 +6,9 @@ class TestDarkWorld(TestInvertedOWG): def testSouthDarkWorld(self): self.run_location_tests([ ["Hype Cave - Top", True, []], - ["Hype Cave - Middle Right", True, []], - ["Hype Cave - Middle Left", True, []], - ["Hype Cave - Bottom", True, []], - ["Hype Cave - Generous Guy", True, []], ["Stumpy", True, []], diff --git a/test/inverted_owg/TestDungeons.py b/test/inverted_owg/TestDungeons.py index 72cdb1aa..3864bff6 100644 --- a/test/inverted_owg/TestDungeons.py +++ b/test/inverted_owg/TestDungeons.py @@ -19,8 +19,7 @@ class TestDungeons(TestInvertedOWG): ["Sewers - Secret Room - Left", False, []], ["Sewers - Secret Room - Left", True, ['Moon Pearl', 'Progressive Glove', 'Pegasus Boots']], ["Sewers - Secret Room - Left", True, ['Moon Pearl', 'Pegasus Boots', 'Lamp', 'Small Key (Escape)']], - ["Sewers - Secret Room - Left", True, - ['Magic Mirror', 'Pegasus Boots', 'Lamp', 'Small Key (Escape)']], + ["Sewers - Secret Room - Left", True, ['Magic Mirror', 'Pegasus Boots', 'Lamp', 'Small Key (Escape)']], ["Sewers - Secret Room - Left", True, ['Beat Agahnim 1', 'Lamp', 'Small Key (Escape)']], ["Eastern Palace - Compass Chest", False, []], diff --git a/test/inverted_owg/TestInvertedOWG.py b/test/inverted_owg/TestInvertedOWG.py index c565461f..a82a092a 100644 --- a/test/inverted_owg/TestInvertedOWG.py +++ b/test/inverted_owg/TestInvertedOWG.py @@ -2,6 +2,7 @@ from BaseClasses import World from DoorShuffle import link_doors from Doors import create_doors from Dungeons import create_dungeons, get_dungeon_item_pool +from OverworldShuffle import link_overworld from EntranceShuffle import link_inverted_entrances from ItemList import generate_itempool, difficulties from Items import ItemFactory @@ -14,7 +15,7 @@ from test.TestBase import TestBase class TestInvertedOWG(TestBase): def setUp(self): - self.world = World(1, {1: 'vanilla'}, {1: 'vanilla'}, {1: 'owglitches'}, {1: 'inverted'}, {1: 'random'}, {1: 'normal'}, {1: 'normal'}, 'none', 'on', {1: 'ganon'}, 'balanced', {1: 'items'}, + self.world = World(1, {1: 'vanilla'}, {1: 'vanilla'}, {1: 'vanilla'}, {1: 'owglitches'}, {1: 'inverted'}, {1: 'random'}, {1: 'normal'}, {1: 'normal'}, 'none', 'on', {1: 'ganon'}, 'balanced', {1: 'items'}, {1: True}, {1: False}, False, None, {1: False}) self.world.difficulty_requirements[1] = difficulties['normal'] self.world.intensity = {1: 1} @@ -24,6 +25,7 @@ class TestInvertedOWG(TestBase): create_doors(self.world, 1) create_rooms(self.world, 1) create_dungeons(self.world, 1) + link_overworld(self.world, 1) create_owg_connections(self.world, 1) link_inverted_entrances(self.world, 1) link_doors(self.world, 1) diff --git a/test/owg/TestLightWorld.py b/test/owg/TestLightWorld.py index 02ea2f3b..b3e8275c 100644 --- a/test/owg/TestLightWorld.py +++ b/test/owg/TestLightWorld.py @@ -30,29 +30,19 @@ class TestLightWorld(TestVanillaOWG): ["Aginah's Cave", True, []], ["Sahasrahla's Hut - Left", True, []], - ["Sahasrahla's Hut - Middle", True, []], - ["Sahasrahla's Hut - Right", True, []], ["Kakariko Well - Top", True, []], - ["Kakariko Well - Left", True, []], - ["Kakariko Well - Middle", True, []], - ["Kakariko Well - Right", True, []], - ["Kakariko Well - Bottom", True, []], ["Blind's Hideout - Top", True, []], - ["Blind's Hideout - Left", True, []], - ["Blind's Hideout - Right", True, []], - ["Blind's Hideout - Far Left", True, []], - ["Blind's Hideout - Far Right", True, []], ["Bonk Rock Cave", False, []], @@ -60,11 +50,8 @@ class TestLightWorld(TestVanillaOWG): ["Bonk Rock Cave", True, ['Pegasus Boots']], ["Mini Moldorm Cave - Far Left", True, []], - ["Mini Moldorm Cave - Left", True, []], - ["Mini Moldorm Cave - Right", True, []], - ["Mini Moldorm Cave - Far Right", True, []], ["Ice Rod Cave", True, []], diff --git a/test/owg/TestVanillaOWG.py b/test/owg/TestVanillaOWG.py index 7aff5d8e..9b1ad9f1 100644 --- a/test/owg/TestVanillaOWG.py +++ b/test/owg/TestVanillaOWG.py @@ -2,6 +2,7 @@ from BaseClasses import World from DoorShuffle import link_doors from Doors import create_doors from Dungeons import create_dungeons, get_dungeon_item_pool +from OverworldShuffle import link_overworld from EntranceShuffle import link_entrances from ItemList import difficulties, generate_itempool from Items import ItemFactory @@ -14,7 +15,7 @@ from test.TestBase import TestBase class TestVanillaOWG(TestBase): def setUp(self): - self.world = World(1, {1:'vanilla'}, {1:'vanilla'}, {1:'owglitches'}, {1:'open'}, {1:'random'}, {1:'normal'}, {1:'normal'}, 'none', 'on', {1:'ganon'}, 'balanced', {1:'items'}, + self.world = World(1, {1:'vanilla'}, {1:'vanilla'}, {1:'vanilla'}, {1:'owglitches'}, {1:'open'}, {1:'random'}, {1:'normal'}, {1:'normal'}, 'none', 'on', {1:'ganon'}, 'balanced', {1:'items'}, {1:True}, {1:False}, False, None, {1:False}) self.world.difficulty_requirements[1] = difficulties['normal'] self.world.intensity = {1:1} @@ -24,6 +25,7 @@ class TestVanillaOWG(TestBase): create_doors(self.world, 1) create_rooms(self.world, 1) create_dungeons(self.world, 1) + link_overworld(self.world, 1) link_entrances(self.world, 1) link_doors(self.world, 1) create_owg_connections(self.world, 1) diff --git a/test/vanilla/TestLightWorld.py b/test/vanilla/TestLightWorld.py index 259036c7..b8c4b5d4 100644 --- a/test/vanilla/TestLightWorld.py +++ b/test/vanilla/TestLightWorld.py @@ -34,29 +34,19 @@ class TestLightWorld(TestVanilla): ["Aginah's Cave", True, []], ["Sahasrahla's Hut - Left", True, []], - ["Sahasrahla's Hut - Middle", True, []], - ["Sahasrahla's Hut - Right", True, []], ["Kakariko Well - Top", True, []], - ["Kakariko Well - Left", True, []], - ["Kakariko Well - Middle", True, []], - ["Kakariko Well - Right", True, []], - ["Kakariko Well - Bottom", True, []], ["Blind's Hideout - Top", True, []], - ["Blind's Hideout - Left", True, []], - ["Blind's Hideout - Right", True, []], - ["Blind's Hideout - Far Left", True, []], - ["Blind's Hideout - Far Right", True, []], ["Bonk Rock Cave", False, []], @@ -64,11 +54,8 @@ class TestLightWorld(TestVanilla): ["Bonk Rock Cave", True, ['Pegasus Boots']], ["Mini Moldorm Cave - Far Left", True, []], - ["Mini Moldorm Cave - Left", True, []], - ["Mini Moldorm Cave - Right", True, []], - ["Mini Moldorm Cave - Far Right", True, []], ["Ice Rod Cave", True, []], diff --git a/test/vanilla/TestVanilla.py b/test/vanilla/TestVanilla.py index 355f2769..56afbd53 100644 --- a/test/vanilla/TestVanilla.py +++ b/test/vanilla/TestVanilla.py @@ -2,6 +2,7 @@ from BaseClasses import World from DoorShuffle import link_doors from Doors import create_doors from Dungeons import create_dungeons, get_dungeon_item_pool +from OverworldShuffle import link_overworld from EntranceShuffle import link_entrances from ItemList import difficulties, generate_itempool from Items import ItemFactory @@ -13,7 +14,7 @@ from test.TestBase import TestBase class TestVanilla(TestBase): def setUp(self): - self.world = World(1, {1:'vanilla'}, {1:'vanilla'}, {1:'noglitches'}, {1:'open'}, {1:'random'}, {1:'normal'}, {1:'normal'}, 'none', 'on', {1:'ganon'}, 'balanced', {1:'items'}, + self.world = World(1, {1:'vanilla'}, {1:'vanilla'}, {1:'vanilla'}, {1:'noglitches'}, {1:'open'}, {1:'random'}, {1:'normal'}, {1:'normal'}, 'none', 'on', {1:'ganon'}, 'balanced', {1:'items'}, {1:True}, {1:False}, False, None, {1:False}) self.world.difficulty_requirements[1] = difficulties['normal'] self.world.intensity = {1:1} @@ -23,6 +24,7 @@ class TestVanilla(TestBase): create_doors(self.world, 1) create_rooms(self.world, 1) create_dungeons(self.world, 1) + link_overworld(self.world, 1) link_entrances(self.world, 1) link_doors(self.world, 1) generate_itempool(self.world, 1)