Update TestSuite with OW shuffle options
This commit is contained in:
@@ -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),
|
||||
|
||||
@@ -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]:
|
||||
|
||||
@@ -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 = []
|
||||
|
||||
@@ -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)
|
||||
|
||||
@@ -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)
|
||||
|
||||
@@ -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, []],
|
||||
|
||||
@@ -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"]],
|
||||
])
|
||||
@@ -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, []],
|
||||
|
||||
@@ -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, []],
|
||||
|
||||
@@ -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)
|
||||
|
||||
@@ -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, []],
|
||||
|
||||
@@ -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)
|
||||
|
||||
@@ -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, []],
|
||||
|
||||
@@ -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)
|
||||
|
||||
Reference in New Issue
Block a user