Update TestSuite with OW shuffle options

This commit is contained in:
codemann8
2021-05-23 23:20:20 -05:00
parent daae593aa8
commit 9d70a8c19d
14 changed files with 42 additions and 66 deletions

View File

@@ -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)

View File

@@ -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)

View File

@@ -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, []],

View File

@@ -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"]],
])