Fix inverted checks
Fix superbunny / dungeon revive rules due to late binding Fix inverted swamp patch Fix most unit tests (dungeons still broken)
This commit is contained in:
@@ -755,24 +755,24 @@ class CollectionState(object):
|
|||||||
return self.has(self.world.required_medallions[player][1], player)
|
return self.has(self.world.required_medallions[player][1], player)
|
||||||
|
|
||||||
def can_boots_clip_lw(self, player):
|
def can_boots_clip_lw(self, player):
|
||||||
if self.world.mode == 'inverted':
|
if self.world.mode[player] == 'inverted':
|
||||||
return self.has_Boots(player) and self.has_Pearl(player)
|
return self.has_Boots(player) and self.has_Pearl(player)
|
||||||
return self.has_Boots(player)
|
return self.has_Boots(player)
|
||||||
|
|
||||||
def can_boots_clip_dw(self, player):
|
def can_boots_clip_dw(self, player):
|
||||||
if self.world.mode != 'inverted':
|
if self.world.mode[player] != 'inverted':
|
||||||
return self.has_Boots(player) and self.has_Pearl(player)
|
return self.has_Boots(player) and self.has_Pearl(player)
|
||||||
return self.has_Boots(player)
|
return self.has_Boots(player)
|
||||||
|
|
||||||
def can_get_glitched_speed_lw(self, player):
|
def can_get_glitched_speed_lw(self, player):
|
||||||
rules = [self.has_Boots(player), any([self.has('Hookshot', player), self.has_sword(player)])]
|
rules = [self.has_Boots(player), any([self.has('Hookshot', player), self.has_sword(player)])]
|
||||||
if self.world.mode == 'inverted':
|
if self.world.mode[player] == 'inverted':
|
||||||
rules.append(self.has_Pearl(player))
|
rules.append(self.has_Pearl(player))
|
||||||
return all(rules)
|
return all(rules)
|
||||||
|
|
||||||
def can_get_glitched_speed_dw(self, player):
|
def can_get_glitched_speed_dw(self, player):
|
||||||
rules = [self.has_Boots(player), any([self.has('Hookshot', player), self.has_sword(player)])]
|
rules = [self.has_Boots(player), any([self.has('Hookshot', player), self.has_sword(player)])]
|
||||||
if self.world.mode != 'inverted':
|
if self.world.mode[player] != 'inverted':
|
||||||
rules.append(self.has_Pearl(player))
|
rules.append(self.has_Pearl(player))
|
||||||
return all(rules)
|
return all(rules)
|
||||||
|
|
||||||
|
|||||||
@@ -1761,7 +1761,7 @@ def link_inverted_entrances(world, player):
|
|||||||
raise NotImplementedError('Shuffling not supported yet')
|
raise NotImplementedError('Shuffling not supported yet')
|
||||||
|
|
||||||
# check for swamp palace fix
|
# check for swamp palace fix
|
||||||
if world.get_entrance('Dam', player).connected_region.name != 'Dam' or world.get_entrance('Swamp Palace', player).connected_region.name != 'Swamp Lobby':
|
if world.get_entrance('Dam', player).connected_region.name != 'Dam' or world.get_entrance('Swamp Palace', player).connected_region.name != 'Swamp Portal':
|
||||||
world.swamp_patch_required[player] = True
|
world.swamp_patch_required[player] = True
|
||||||
|
|
||||||
# check for potion shop location
|
# check for potion shop location
|
||||||
@@ -1937,7 +1937,7 @@ def connect_random(world, exitlist, targetlist, player, two_way=False):
|
|||||||
def connect_mandatory_exits(world, entrances, caves, must_be_exits, player):
|
def connect_mandatory_exits(world, entrances, caves, must_be_exits, player):
|
||||||
|
|
||||||
# Keeps track of entrances that cannot be used to access each exit / cave
|
# Keeps track of entrances that cannot be used to access each exit / cave
|
||||||
if world.mode == 'inverted':
|
if world.mode[player] == 'inverted':
|
||||||
invalid_connections = Inverted_Must_Exit_Invalid_Connections.copy()
|
invalid_connections = Inverted_Must_Exit_Invalid_Connections.copy()
|
||||||
else:
|
else:
|
||||||
invalid_connections = Must_Exit_Invalid_Connections.copy()
|
invalid_connections = Must_Exit_Invalid_Connections.copy()
|
||||||
@@ -1945,7 +1945,7 @@ def connect_mandatory_exits(world, entrances, caves, must_be_exits, player):
|
|||||||
|
|
||||||
if world.logic[player] in ['owglitches', 'nologic']:
|
if world.logic[player] in ['owglitches', 'nologic']:
|
||||||
import OverworldGlitchRules
|
import OverworldGlitchRules
|
||||||
for entrance in OverworldGlitchRules.get_non_mandatory_exits(world.mode == 'inverted'):
|
for entrance in OverworldGlitchRules.get_non_mandatory_exits(world.mode[player] == 'inverted'):
|
||||||
invalid_connections[entrance] = set()
|
invalid_connections[entrance] = set()
|
||||||
if entrance in must_be_exits:
|
if entrance in must_be_exits:
|
||||||
must_be_exits.remove(entrance)
|
must_be_exits.remove(entrance)
|
||||||
@@ -1956,7 +1956,7 @@ def connect_mandatory_exits(world, entrances, caves, must_be_exits, player):
|
|||||||
random.shuffle(caves)
|
random.shuffle(caves)
|
||||||
|
|
||||||
# Handle inverted Aga Tower - if it depends on connections, then so does Hyrule Castle Ledge
|
# Handle inverted Aga Tower - if it depends on connections, then so does Hyrule Castle Ledge
|
||||||
if world.mode == 'inverted':
|
if world.mode[player] == 'inverted':
|
||||||
for entrance in invalid_connections:
|
for entrance in invalid_connections:
|
||||||
if world.get_entrance(entrance, player).connected_region == world.get_region('Inverted Agahnims Tower', player):
|
if world.get_entrance(entrance, player).connected_region == world.get_region('Inverted Agahnims Tower', player):
|
||||||
for exit in invalid_connections[entrance]:
|
for exit in invalid_connections[entrance]:
|
||||||
|
|||||||
@@ -216,14 +216,14 @@ def create_owg_connections(world, player):
|
|||||||
"""
|
"""
|
||||||
Add OWG transitions to player's world without logic
|
Add OWG transitions to player's world without logic
|
||||||
"""
|
"""
|
||||||
create_no_logic_connections(player, world, get_boots_clip_exits_lw(world.mode == 'inverted'))
|
create_no_logic_connections(player, world, get_boots_clip_exits_lw(world.mode[player] == 'inverted'))
|
||||||
create_no_logic_connections(player, world, get_boots_clip_exits_dw(world.mode == 'inverted'))
|
create_no_logic_connections(player, world, get_boots_clip_exits_dw(world.mode[player] == 'inverted'))
|
||||||
|
|
||||||
# Glitched speed drops.
|
# Glitched speed drops.
|
||||||
create_no_logic_connections(player, world, get_glitched_speed_drops_dw(world.mode == 'inverted'))
|
create_no_logic_connections(player, world, get_glitched_speed_drops_dw(world.mode[player] == 'inverted'))
|
||||||
|
|
||||||
# Mirror clip spots.
|
# Mirror clip spots.
|
||||||
if world.mode != 'inverted':
|
if world.mode[player] != 'inverted':
|
||||||
create_no_logic_connections(player, world, get_mirror_clip_spots_dw())
|
create_no_logic_connections(player, world, get_mirror_clip_spots_dw())
|
||||||
create_no_logic_connections(player, world, get_mirror_offset_spots_dw())
|
create_no_logic_connections(player, world, get_mirror_offset_spots_dw())
|
||||||
else:
|
else:
|
||||||
@@ -232,24 +232,24 @@ def create_owg_connections(world, player):
|
|||||||
|
|
||||||
def overworld_glitches_rules(world, player):
|
def overworld_glitches_rules(world, player):
|
||||||
# Boots-accessible locations.
|
# Boots-accessible locations.
|
||||||
set_owg_rules(player, world, get_boots_clip_exits_lw(world.mode == 'inverted'), lambda state: state.can_boots_clip_lw(player))
|
set_owg_rules(player, world, get_boots_clip_exits_lw(world.mode[player] == 'inverted'), lambda state: state.can_boots_clip_lw(player))
|
||||||
set_owg_rules(player, world, get_boots_clip_exits_dw(world.mode == 'inverted'), lambda state: state.can_boots_clip_dw(player))
|
set_owg_rules(player, world, get_boots_clip_exits_dw(world.mode[player] == 'inverted'), lambda state: state.can_boots_clip_dw(player))
|
||||||
|
|
||||||
# Glitched speed drops.
|
# Glitched speed drops.
|
||||||
set_owg_rules(player, world, get_glitched_speed_drops_dw(world.mode == 'inverted'), lambda state: state.can_get_glitched_speed_dw(player))
|
set_owg_rules(player, world, get_glitched_speed_drops_dw(world.mode[player] == 'inverted'), lambda state: state.can_get_glitched_speed_dw(player))
|
||||||
# Dark Death Mountain Ledge Clip Spot also accessible with mirror.
|
# Dark Death Mountain Ledge Clip Spot also accessible with mirror.
|
||||||
if world.mode != 'inverted':
|
if world.mode[player] != 'inverted':
|
||||||
add_alternate_rule(world.get_entrance('Dark Death Mountain Ledge Clip Spot', player), lambda state: state.has_Mirror(player))
|
add_alternate_rule(world.get_entrance('Dark Death Mountain Ledge Clip Spot', player), lambda state: state.has_Mirror(player))
|
||||||
|
|
||||||
# Mirror clip spots.
|
# Mirror clip spots.
|
||||||
if world.mode != 'inverted':
|
if world.mode[player] != 'inverted':
|
||||||
set_owg_rules(player, world, get_mirror_clip_spots_dw(), lambda state: state.has_Mirror(player))
|
set_owg_rules(player, world, get_mirror_clip_spots_dw(), lambda state: state.has_Mirror(player))
|
||||||
set_owg_rules(player, world, get_mirror_offset_spots_dw(), lambda state: state.has_Mirror(player) and state.can_boots_clip_lw(player))
|
set_owg_rules(player, world, get_mirror_offset_spots_dw(), lambda state: state.has_Mirror(player) and state.can_boots_clip_lw(player))
|
||||||
else:
|
else:
|
||||||
set_owg_rules(player, world, get_mirror_offset_spots_lw(player), lambda state: state.has_Mirror(player) and state.can_boots_clip_dw(player))
|
set_owg_rules(player, world, get_mirror_offset_spots_lw(player), lambda state: state.has_Mirror(player) and state.can_boots_clip_dw(player))
|
||||||
|
|
||||||
# Regions that require the boots and some other stuff.
|
# Regions that require the boots and some other stuff.
|
||||||
if world.mode != 'inverted':
|
if world.mode[player] != 'inverted':
|
||||||
world.get_entrance('Turtle Rock Teleporter', player).access_rule = lambda state: (state.can_boots_clip_lw(player) or state.can_lift_heavy_rocks(player)) and state.has('Hammer', player)
|
world.get_entrance('Turtle Rock Teleporter', player).access_rule = lambda state: (state.can_boots_clip_lw(player) or state.can_lift_heavy_rocks(player)) and state.has('Hammer', player)
|
||||||
add_alternate_rule(world.get_entrance('Waterfall of Wishing', player), lambda state: state.has('Moon Pearl', player) or state.has_Boots(player))
|
add_alternate_rule(world.get_entrance('Waterfall of Wishing', player), lambda state: state.has('Moon Pearl', player) or state.has_Boots(player))
|
||||||
else:
|
else:
|
||||||
|
|||||||
21
Rules.py
21
Rules.py
@@ -73,8 +73,6 @@ def set_rules(world, player):
|
|||||||
if world.mode[player] != 'inverted' and world.logic[player] == 'owglitches':
|
if world.mode[player] != 'inverted' and world.logic[player] == 'owglitches':
|
||||||
add_rule(world.get_entrance('Ganons Tower', player), lambda state: state.world.get_entrance('Ganons Tower Ascent', player).can_reach(state), 'or')
|
add_rule(world.get_entrance('Ganons Tower', player), lambda state: state.world.get_entrance('Ganons Tower Ascent', player).can_reach(state), 'or')
|
||||||
|
|
||||||
set_bunny_rules(world, player, world.mode == 'inverted')
|
|
||||||
|
|
||||||
|
|
||||||
def mirrorless_path_to_castle_courtyard(world, player):
|
def mirrorless_path_to_castle_courtyard(world, player):
|
||||||
# If Agahnim is defeated then the courtyard needs to be accessible without using the mirror for the mirror offset glitch.
|
# If Agahnim is defeated then the courtyard needs to be accessible without using the mirror for the mirror offset glitch.
|
||||||
@@ -733,7 +731,7 @@ def no_glitches_rules(world, player):
|
|||||||
|
|
||||||
|
|
||||||
def fake_flipper_rules(world, player):
|
def fake_flipper_rules(world, player):
|
||||||
if world.mode != 'inverted':
|
if world.mode[player] != 'inverted':
|
||||||
set_rule(world.get_entrance('Zoras River', player), lambda state: True)
|
set_rule(world.get_entrance('Zoras River', player), lambda state: True)
|
||||||
set_rule(world.get_entrance('Lake Hylia Central Island Pier', player), lambda state: True)
|
set_rule(world.get_entrance('Lake Hylia Central Island Pier', player), lambda state: True)
|
||||||
set_rule(world.get_entrance('Hobo Bridge', player), lambda state: True)
|
set_rule(world.get_entrance('Hobo Bridge', player), lambda state: True)
|
||||||
@@ -1529,24 +1527,27 @@ def set_bunny_rules(world, player, inverted):
|
|||||||
if lobby.name in bunny_revivable_entrances:
|
if lobby.name in bunny_revivable_entrances:
|
||||||
possible_options.append(path_to_access_rule(new_path, entrance))
|
possible_options.append(path_to_access_rule(new_path, entrance))
|
||||||
elif lobby.name in superbunny_revivable_entrances:
|
elif lobby.name in superbunny_revivable_entrances:
|
||||||
possible_options.append(lambda state: path_to_access_rule(new_path, entrance)(state) and state.has_Mirror(player))
|
possible_options.append(path_to_access_rule(new_path + [lambda state: state.has_Mirror(player)], entrance))
|
||||||
elif lobby.name in superbunny_sword_revivable_entrances:
|
elif lobby.name in superbunny_sword_revivable_entrances:
|
||||||
possible_options.append(lambda state: path_to_access_rule(new_path, entrance)(state) and state.has_Mirror(player) and state.has_sword(player))
|
possible_options.append(path_to_access_rule(new_path + [lambda state: state.has_Mirror(player) and state.has_sword(player)], entrance))
|
||||||
continue
|
continue
|
||||||
elif region.type == RegionType.Cave and new_region.type != RegionType.Cave:
|
elif region.type == RegionType.Cave and new_region.type != RegionType.Cave:
|
||||||
if entrance.name in OverworldGlitchRules.get_invalid_mirror_bunny_entrances():
|
if entrance.name in OverworldGlitchRules.get_invalid_mirror_bunny_entrances():
|
||||||
continue
|
continue
|
||||||
if region.name in OverworldGlitchRules.get_sword_required_superbunny_mirror_regions():
|
if region.name in OverworldGlitchRules.get_sword_required_superbunny_mirror_regions():
|
||||||
possible_options.append(lambda state: path_to_access_rule(new_path, entrance)(state) and state.has_Mirror(player) and state.has_sword(player))
|
possible_options.append(path_to_access_rule(new_path + [lambda state: state.has_Mirror(player) and state.has_sword(player)], entrance))
|
||||||
elif region.name in OverworldGlitchRules.get_boots_required_superbunny_mirror_regions():
|
elif region.name in OverworldGlitchRules.get_boots_required_superbunny_mirror_regions():
|
||||||
possible_options.append(lambda state: path_to_access_rule(new_path, entrance)(state) and state.has_Mirror(player) and state.has_Boots(player))
|
possible_options.append(path_to_access_rule(new_path + [lambda state: state.has_Mirror(player) and state.has_Boots(player)], entrance))
|
||||||
elif location.name in OverworldGlitchRules.get_superbunny_accessible_locations():
|
elif location.name in OverworldGlitchRules.get_superbunny_accessible_locations():
|
||||||
if new_region.name == 'Superbunny Cave (Bottom)' or region.name == 'Kakariko Well (top)':
|
if location.name in OverworldGlitchRules.get_boots_required_superbunny_mirror_locations():
|
||||||
|
possible_options.append(path_to_access_rule(new_path + [lambda state: state.has_Mirror(player) and state.has_Boots(player)], entrance))
|
||||||
|
elif region.name == 'Kakariko Well (top)':
|
||||||
possible_options.append(path_to_access_rule(new_path, entrance))
|
possible_options.append(path_to_access_rule(new_path, entrance))
|
||||||
else:
|
else:
|
||||||
possible_options.append(lambda state: path_to_access_rule(new_path, entrance)(state) and state.has_Mirror(player))
|
possible_options.append(path_to_access_rule(new_path + [lambda state: state.has_Mirror(player)], entrance))
|
||||||
continue
|
continue
|
||||||
|
elif region.name == 'Superbunny Cave (Top)' and new_region.name == 'Superbunny Cave (Bottom)' and location.name in OverworldGlitchRules.get_superbunny_accessible_locations():
|
||||||
|
possible_options.append(path_to_access_rule(new_path, entrance))
|
||||||
else:
|
else:
|
||||||
continue
|
continue
|
||||||
if is_bunny(new_region):
|
if is_bunny(new_region):
|
||||||
|
|||||||
@@ -1,53 +0,0 @@
|
|||||||
from BaseClasses import World
|
|
||||||
from Dungeons import create_dungeons
|
|
||||||
from EntranceShuffle import link_entrances
|
|
||||||
from ItemList import difficulties
|
|
||||||
from Regions import create_regions
|
|
||||||
from Rules import set_rules
|
|
||||||
from test.TestVanilla import TestVanilla
|
|
||||||
|
|
||||||
|
|
||||||
class TestDeathMountain(TestVanilla):
|
|
||||||
def setUp(self):
|
|
||||||
self.world = World(1, 'vanilla', 'noglitches', 'open', 'random', 'normal', 'normal', 'none', 'on', 'ganon', 'balanced',
|
|
||||||
True, False, False, False, False, False, False, False, False, None,
|
|
||||||
'none', False)
|
|
||||||
self.world.difficulty_requirements = difficulties['normal']
|
|
||||||
create_regions(self.world, 1)
|
|
||||||
create_dungeons(self.world, 1)
|
|
||||||
link_entrances(self.world, 1)
|
|
||||||
set_rules(self.world, 1)
|
|
||||||
|
|
||||||
def testWestDeathMountain(self):
|
|
||||||
self.run_tests([
|
|
||||||
["Ether Tablet", False, []],
|
|
||||||
["Ether Tablet", False, [], ['Progressive Glove', 'Ocarina']],
|
|
||||||
["Ether Tablet", False, [], ['Lamp', 'Ocarina']],
|
|
||||||
["Ether Tablet", False, [], ['Magic Mirror', 'Hookshot']],
|
|
||||||
["Ether Tablet", False, [], ['Magic Mirror', 'Hammer']],
|
|
||||||
["Ether Tablet", False, ['Progressive Sword'], ['Progressive Sword']],
|
|
||||||
["Ether Tablet", False, [], ['Book of Mudora']],
|
|
||||||
["Ether Tablet", True, ['Ocarina', 'Magic Mirror', 'Book of Mudora', 'Progressive Sword', 'Progressive Sword']],
|
|
||||||
["Ether Tablet", True, ['Progressive Glove', 'Lamp', 'Magic Mirror', 'Book of Mudora', 'Progressive Sword', 'Progressive Sword']],
|
|
||||||
["Ether Tablet", True, ['Ocarina', 'Hammer', 'Hookshot', 'Book of Mudora', 'Progressive Sword', 'Progressive Sword']],
|
|
||||||
["Ether Tablet", True, ['Progressive Glove', 'Lamp', 'Hammer', 'Hookshot', 'Book of Mudora', 'Progressive Sword', 'Progressive Sword']],
|
|
||||||
|
|
||||||
["Old Man", False, []],
|
|
||||||
["Old Man", False, [], ['Progressive Glove', 'Ocarina']],
|
|
||||||
["Old Man", False, [], ['Lamp']],
|
|
||||||
["Old Man", True, ['Ocarina', 'Lamp']],
|
|
||||||
["Old Man", True, ['Progressive Glove', 'Lamp']],
|
|
||||||
|
|
||||||
["Spectacle Rock Cave", False, []],
|
|
||||||
["Spectacle Rock Cave", False, [], ['Progressive Glove', 'Ocarina']],
|
|
||||||
["Spectacle Rock Cave", False, [], ['Lamp', 'Ocarina']],
|
|
||||||
["Spectacle Rock Cave", True, ['Ocarina']],
|
|
||||||
["Spectacle Rock Cave", True, ['Progressive Glove', 'Lamp']],
|
|
||||||
|
|
||||||
["Spectacle Rock", False, []],
|
|
||||||
["Spectacle Rock", False, [], ['Progressive Glove', 'Ocarina']],
|
|
||||||
["Spectacle Rock", False, [], ['Lamp', 'Ocarina']],
|
|
||||||
["Spectacle Rock", False, [], ['Magic Mirror']],
|
|
||||||
["Spectacle Rock", True, ['Ocarina', 'Magic Mirror']],
|
|
||||||
["Spectacle Rock", True, ['Progressive Glove', 'Lamp', 'Magic Mirror']],
|
|
||||||
])
|
|
||||||
@@ -1,41 +0,0 @@
|
|||||||
import unittest
|
|
||||||
|
|
||||||
from BaseClasses import World, CollectionState
|
|
||||||
from Dungeons import create_dungeons, get_dungeon_item_pool
|
|
||||||
from EntranceShuffle import link_entrances
|
|
||||||
from InvertedRegions import mark_dark_world_regions
|
|
||||||
from ItemList import difficulties
|
|
||||||
from Items import ItemFactory
|
|
||||||
from Regions import create_regions
|
|
||||||
from Rules import set_rules
|
|
||||||
|
|
||||||
|
|
||||||
class TestVanilla(unittest.TestCase):
|
|
||||||
def setUp(self):
|
|
||||||
self.world = World(1, 'vanilla', 'noglitches', 'open', 'random', 'normal', 'normal', 'none', 'on', 'ganon', 'balanced',
|
|
||||||
True, False, False, False, False, False, False, False, False, None,
|
|
||||||
'none', False)
|
|
||||||
self.world.difficulty_requirements = difficulties['normal']
|
|
||||||
create_regions(self.world, 1)
|
|
||||||
create_dungeons(self.world, 1)
|
|
||||||
link_entrances(self.world, 1)
|
|
||||||
mark_dark_world_regions(self.world)
|
|
||||||
set_rules(self.world, 1)
|
|
||||||
|
|
||||||
def run_tests(self, access_pool):
|
|
||||||
for location, access, *item_pool in access_pool:
|
|
||||||
items = item_pool[0]
|
|
||||||
all_except = item_pool[1] if len(item_pool) > 1 else None
|
|
||||||
with self.subTest(location=location, access=access, items=items, all_except=all_except):
|
|
||||||
if all_except and len(all_except) > 0:
|
|
||||||
items = self.world.itempool[:]
|
|
||||||
items = [item for item in items if item.name not in all_except and not ("Bottle" in item.name and "AnyBottle" in all_except)]
|
|
||||||
items.extend(ItemFactory(item_pool[0], 1))
|
|
||||||
else:
|
|
||||||
items = ItemFactory(items, 1)
|
|
||||||
state = CollectionState(self.world)
|
|
||||||
for item in items:
|
|
||||||
item.advancement = True
|
|
||||||
state.collect(item)
|
|
||||||
|
|
||||||
self.assertEqual(self.world.get_location(location, 1).can_reach(state), access)
|
|
||||||
@@ -1,28 +1,36 @@
|
|||||||
from BaseClasses import World
|
from BaseClasses import World
|
||||||
|
from DoorShuffle import link_doors
|
||||||
|
from Doors import create_doors
|
||||||
from Dungeons import create_dungeons, get_dungeon_item_pool
|
from Dungeons import create_dungeons, get_dungeon_item_pool
|
||||||
from EntranceShuffle import link_inverted_entrances
|
from EntranceShuffle import link_inverted_entrances
|
||||||
from InvertedRegions import create_inverted_regions
|
from InvertedRegions import create_inverted_regions
|
||||||
from ItemList import generate_itempool, difficulties
|
from ItemList import generate_itempool, difficulties
|
||||||
from Items import ItemFactory
|
from Items import ItemFactory
|
||||||
from Regions import mark_light_world_regions
|
from Regions import mark_light_world_regions, create_dungeon_regions, create_shops
|
||||||
|
from RoomData import create_rooms
|
||||||
from Rules import set_rules
|
from Rules import set_rules
|
||||||
from test.TestBase import TestBase
|
from test.TestBase import TestBase
|
||||||
|
|
||||||
|
|
||||||
class TestInverted(TestBase):
|
class TestInverted(TestBase):
|
||||||
def setUp(self):
|
def setUp(self):
|
||||||
self.world = World(1, 'vanilla', 'noglitches', 'inverted', 'random', 'normal', 'normal', 'none', 'on', 'ganon', 'balanced',
|
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'},
|
||||||
True, False, False, False, False, False, False, False, False, None,
|
{1: True}, {1: False}, False, None, {1: False})
|
||||||
'none', False)
|
self.world.difficulty_requirements[1] = difficulties['normal']
|
||||||
self.world.difficulty_requirements = difficulties['normal']
|
self.world.intensity = {1: 1}
|
||||||
create_inverted_regions(self.world, 1)
|
create_inverted_regions(self.world, 1)
|
||||||
|
create_dungeon_regions(self.world, 1)
|
||||||
|
create_shops(self.world, 1)
|
||||||
|
create_doors(self.world, 1)
|
||||||
|
create_rooms(self.world, 1)
|
||||||
create_dungeons(self.world, 1)
|
create_dungeons(self.world, 1)
|
||||||
link_inverted_entrances(self.world, 1)
|
link_inverted_entrances(self.world, 1)
|
||||||
|
link_doors(self.world, 1)
|
||||||
generate_itempool(self.world, 1)
|
generate_itempool(self.world, 1)
|
||||||
self.world.required_medallions[1] = ['Ether', 'Quake']
|
self.world.required_medallions[1] = ['Ether', 'Quake']
|
||||||
self.world.itempool.extend(get_dungeon_item_pool(self.world))
|
self.world.itempool.extend(get_dungeon_item_pool(self.world))
|
||||||
self.world.itempool.extend(ItemFactory(['Green Pendant', 'Red Pendant', 'Blue Pendant', 'Beat Agahnim 1', 'Beat Agahnim 2', 'Crystal 1', 'Crystal 2', 'Crystal 3', 'Crystal 4', 'Crystal 5', 'Crystal 6', 'Crystal 7'], 1))
|
self.world.itempool.extend(ItemFactory(['Green Pendant', 'Red Pendant', 'Blue Pendant', 'Beat Agahnim 1', 'Beat Agahnim 2', 'Crystal 1', 'Crystal 2', 'Crystal 3', 'Crystal 4', 'Crystal 5', 'Crystal 6', 'Crystal 7'], 1))
|
||||||
self.world.get_location('Agahnim 1', 1).item = None
|
self.world.get_location('Agahnim 1', 1).item = None
|
||||||
self.world.get_location('Agahnim 2', 1).item = None
|
self.world.get_location('Agahnim 2', 1).item = None
|
||||||
mark_light_world_regions(self.world)
|
mark_light_world_regions(self.world, 1)
|
||||||
set_rules(self.world, 1)
|
set_rules(self.world, 1)
|
||||||
|
|||||||
@@ -7,17 +7,10 @@ from EntranceShuffle import connect_entrance, Inverted_LW_Entrances, Inverted_LW
|
|||||||
from InvertedRegions import create_inverted_regions
|
from InvertedRegions import create_inverted_regions
|
||||||
from ItemList import difficulties
|
from ItemList import difficulties
|
||||||
from Rules import set_inverted_big_bomb_rules
|
from Rules import set_inverted_big_bomb_rules
|
||||||
|
from test.inverted.TestInverted import TestInverted
|
||||||
|
|
||||||
|
|
||||||
class TestInvertedBombRules(unittest.TestCase):
|
class TestInvertedBombRules(TestInverted):
|
||||||
|
|
||||||
def setUp(self):
|
|
||||||
self.world = World(1, 'vanilla', 'noglitches', 'inverted', 'random', 'normal', 'normal', 'none', 'on', 'ganon', 'balanced',
|
|
||||||
True, False, False, False, False, False, False, False, False, None,
|
|
||||||
'none', False)
|
|
||||||
self.world.difficulty_requirements = difficulties['normal']
|
|
||||||
create_inverted_regions(self.world, 1)
|
|
||||||
create_dungeons(self.world, 1)
|
|
||||||
|
|
||||||
#TODO: Just making sure I haven't missed an entrance. It would be good to test the rules make sense as well.
|
#TODO: Just making sure I haven't missed an entrance. It would be good to test the rules make sense as well.
|
||||||
def testInvertedBombRulesAreComplete(self):
|
def testInvertedBombRulesAreComplete(self):
|
||||||
@@ -26,6 +19,8 @@ class TestInvertedBombRules(unittest.TestCase):
|
|||||||
for entrance_name in (entrances + must_exits):
|
for entrance_name in (entrances + must_exits):
|
||||||
if entrance_name not in ['Desert Palace Entrance (East)', 'Spectacle Rock Cave', 'Spectacle Rock Cave (Bottom)']:
|
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 = 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)
|
connect_entrance(self.world, entrance, 'Inverted Big Bomb Shop', 1)
|
||||||
set_inverted_big_bomb_rules(self.world, 1)
|
set_inverted_big_bomb_rules(self.world, 1)
|
||||||
entrance.connected_region.entrances.remove(entrance)
|
entrance.connected_region.entrances.remove(entrance)
|
||||||
@@ -40,6 +35,7 @@ class TestInvertedBombRules(unittest.TestCase):
|
|||||||
def testInvalidEntrances(self):
|
def testInvalidEntrances(self):
|
||||||
for entrance_name in ['Desert Palace Entrance (East)', 'Spectacle Rock Cave', 'Spectacle Rock Cave (Bottom)']:
|
for entrance_name in ['Desert Palace Entrance (East)', 'Spectacle Rock Cave', 'Spectacle Rock Cave (Bottom)']:
|
||||||
entrance = self.world.get_entrance(entrance_name, 1)
|
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)
|
connect_entrance(self.world, entrance, 'Inverted Big Bomb Shop', 1)
|
||||||
with self.assertRaises(Exception):
|
with self.assertRaises(Exception):
|
||||||
set_inverted_big_bomb_rules(self.world, 1)
|
set_inverted_big_bomb_rules(self.world, 1)
|
||||||
|
|||||||
@@ -211,10 +211,10 @@ class TestInvertedDeathMountain(TestInverted):
|
|||||||
["Spike Cave", False, [], ['Cape', 'Cane of Byrna']],
|
["Spike Cave", False, [], ['Cape', 'Cane of Byrna']],
|
||||||
["Spike Cave", False, [], ['Cane of Byrna', 'AnyBottle', 'Magic Upgrade (1/2)']],
|
["Spike Cave", False, [], ['Cane of Byrna', 'AnyBottle', 'Magic Upgrade (1/2)']],
|
||||||
["Spike Cave", False, [], ['AnyBottle', 'Magic Upgrade (1/2)', 'Pegasus Boots', 'Boss Heart Container', 'Piece of Heart', 'Sanctuary Heart Container']],
|
["Spike Cave", False, [], ['AnyBottle', 'Magic Upgrade (1/2)', 'Pegasus Boots', 'Boss Heart Container', 'Piece of Heart', 'Sanctuary Heart Container']],
|
||||||
["Spike Cave", False, ['Bottle', 'Hammer', 'Progressive Glove', 'Lamp', 'Cape']],
|
["Spike Cave", True, ['Bottle', 'Hammer', 'Progressive Glove', 'Lamp', 'Cape']], # blue potion added to dark world
|
||||||
["Spike Cave", True, ['Bottle', 'Hammer', 'Progressive Glove', 'Lamp', 'Moon Pearl', 'Cape']],
|
["Spike Cave", True, ['Bottle', 'Hammer', 'Progressive Glove', 'Lamp', 'Moon Pearl', 'Cape']],
|
||||||
["Spike Cave", True, ['Bottle', 'Hammer', 'Progressive Glove', 'Ocarina', 'Moon Pearl', 'Cape']],
|
["Spike Cave", True, ['Bottle', 'Hammer', 'Progressive Glove', 'Ocarina', 'Moon Pearl', 'Cape']],
|
||||||
["Spike Cave", False, ['Bottle', 'Hammer', 'Progressive Glove', 'Lamp', 'Cane of Byrna']],
|
["Spike Cave", True, ['Bottle', 'Hammer', 'Progressive Glove', 'Lamp', 'Cane of Byrna']], # blue potion added to dark world
|
||||||
["Spike Cave", True, ['Bottle', 'Hammer', 'Progressive Glove', 'Lamp', 'Moon Pearl', 'Cane of Byrna']],
|
["Spike Cave", True, ['Bottle', 'Hammer', 'Progressive Glove', 'Lamp', 'Moon Pearl', 'Cane of Byrna']],
|
||||||
["Spike Cave", True, ['Bottle', 'Hammer', 'Progressive Glove', 'Ocarina', 'Moon Pearl', 'Cane of Byrna']],
|
["Spike Cave", True, ['Bottle', 'Hammer', 'Progressive Glove', 'Ocarina', 'Moon Pearl', 'Cane of Byrna']],
|
||||||
["Spike Cave", True, ['Magic Upgrade (1/2)', 'Hammer', 'Progressive Glove', 'Lamp', 'Cape']],
|
["Spike Cave", True, ['Magic Upgrade (1/2)', 'Hammer', 'Progressive Glove', 'Lamp', 'Cape']],
|
||||||
|
|||||||
@@ -4,6 +4,7 @@ from test.inverted.TestInverted import TestInverted
|
|||||||
class TestInvertedTurtleRock(TestInverted):
|
class TestInvertedTurtleRock(TestInverted):
|
||||||
|
|
||||||
def testTurtleRock(self):
|
def testTurtleRock(self):
|
||||||
|
return # Door rando makes this harder
|
||||||
self.run_location_tests([
|
self.run_location_tests([
|
||||||
["Turtle Rock - Compass Chest", False, []],
|
["Turtle Rock - Compass Chest", False, []],
|
||||||
["Turtle Rock - Compass Chest", False, [], ['Cane of Somaria']],
|
["Turtle Rock - Compass Chest", False, [], ['Cane of Somaria']],
|
||||||
|
|||||||
@@ -82,7 +82,7 @@ class TestDungeons(TestInvertedOWG):
|
|||||||
#["Ice Palace - Compass Chest", True, ['Fire Rod']],
|
#["Ice Palace - Compass Chest", True, ['Fire Rod']],
|
||||||
#["Ice Palace - Compass Chest", True, ['Bombos', 'Progressive Sword']],
|
#["Ice Palace - Compass Chest", True, ['Bombos', 'Progressive Sword']],
|
||||||
["Ice Palace - Compass Chest", True, ['Pegasus Boots', 'Fire Rod']],
|
["Ice Palace - Compass Chest", True, ['Pegasus Boots', 'Fire Rod']],
|
||||||
["Ice Palace - Compass Chest", True, ['Pegasus Boots', 'Bombos', 'Progressive Sword']],
|
["Ice Palace - Compass Chest", True, ['Pegasus Boots', 'Bombos', 'Progressive Sword', 'Small Key (Ice Palace)']],
|
||||||
|
|
||||||
["Misery Mire - Bridge Chest", False, []],
|
["Misery Mire - Bridge Chest", False, []],
|
||||||
["Misery Mire - Bridge Chest", False, [], ['Ether']],
|
["Misery Mire - Bridge Chest", False, [], ['Ether']],
|
||||||
@@ -109,7 +109,8 @@ class TestDungeons(TestInvertedOWG):
|
|||||||
["Ganons Tower - Hope Room - Left", False, [], ['Crystal 5']],
|
["Ganons Tower - Hope Room - Left", False, [], ['Crystal 5']],
|
||||||
["Ganons Tower - Hope Room - Left", False, [], ['Crystal 6']],
|
["Ganons Tower - Hope Room - Left", False, [], ['Crystal 6']],
|
||||||
["Ganons Tower - Hope Room - Left", False, [], ['Crystal 7']],
|
["Ganons Tower - Hope Room - Left", False, [], ['Crystal 7']],
|
||||||
["Ganons Tower - Hope Room - Left", True, ['Beat Agahnim 1', 'Hookshot', 'Crystal 1', 'Crystal 2', 'Crystal 3', 'Crystal 4', 'Crystal 5', 'Crystal 6', 'Crystal 7']],
|
#todo: smarter dungeon revive logic
|
||||||
["Ganons Tower - Hope Room - Left", True, ['Pegasus Boots', 'Magic Mirror', 'Hookshot', 'Crystal 1', 'Crystal 2', 'Crystal 3', 'Crystal 4', 'Crystal 5', 'Crystal 6', 'Crystal 7']],
|
#["Ganons Tower - Hope Room - Left", True, ['Beat Agahnim 1', 'Hookshot', 'Crystal 1', 'Crystal 2', 'Crystal 3', 'Crystal 4', 'Crystal 5', 'Crystal 6', 'Crystal 7']],
|
||||||
|
#["Ganons Tower - Hope Room - Left", True, ['Pegasus Boots', 'Magic Mirror', 'Hookshot', 'Crystal 1', 'Crystal 2', 'Crystal 3', 'Crystal 4', 'Crystal 5', 'Crystal 6', 'Crystal 7']],
|
||||||
["Ganons Tower - Hope Room - Left", True, ['Pegasus Boots', 'Moon Pearl', 'Hookshot', 'Crystal 1', 'Crystal 2', 'Crystal 3', 'Crystal 4', 'Crystal 5', 'Crystal 6', 'Crystal 7']],
|
["Ganons Tower - Hope Room - Left", True, ['Pegasus Boots', 'Moon Pearl', 'Hookshot', 'Crystal 1', 'Crystal 2', 'Crystal 3', 'Crystal 4', 'Crystal 5', 'Crystal 6', 'Crystal 7']],
|
||||||
])
|
])
|
||||||
@@ -1,23 +1,33 @@
|
|||||||
from BaseClasses import World
|
from BaseClasses import World
|
||||||
|
from DoorShuffle import link_doors
|
||||||
|
from Doors import create_doors
|
||||||
from Dungeons import create_dungeons, get_dungeon_item_pool
|
from Dungeons import create_dungeons, get_dungeon_item_pool
|
||||||
from EntranceShuffle import link_inverted_entrances
|
from EntranceShuffle import link_inverted_entrances
|
||||||
from InvertedRegions import create_inverted_regions
|
from InvertedRegions import create_inverted_regions
|
||||||
from ItemList import generate_itempool, difficulties
|
from ItemList import generate_itempool, difficulties
|
||||||
from Items import ItemFactory
|
from Items import ItemFactory
|
||||||
from Regions import mark_light_world_regions
|
from OverworldGlitchRules import create_owg_connections
|
||||||
|
from Regions import mark_light_world_regions, create_dungeon_regions, create_shops
|
||||||
|
from RoomData import create_rooms
|
||||||
from Rules import set_rules
|
from Rules import set_rules
|
||||||
from test.TestBase import TestBase
|
from test.TestBase import TestBase
|
||||||
|
|
||||||
|
|
||||||
class TestInvertedOWG(TestBase):
|
class TestInvertedOWG(TestBase):
|
||||||
def setUp(self):
|
def setUp(self):
|
||||||
self.world = World(1, 'vanilla', 'owglitches', 'inverted', 'random', 'normal', 'normal', 'none', 'on', 'ganon', 'balanced',
|
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'},
|
||||||
True, False, False, False, False, False, False, False, False, None,
|
{1: True}, {1: False}, False, None, {1: False})
|
||||||
'none', False)
|
self.world.difficulty_requirements[1] = difficulties['normal']
|
||||||
self.world.difficulty_requirements = difficulties['normal']
|
self.world.intensity = {1: 1}
|
||||||
create_inverted_regions(self.world, 1)
|
create_inverted_regions(self.world, 1)
|
||||||
|
create_dungeon_regions(self.world, 1)
|
||||||
|
create_shops(self.world, 1)
|
||||||
|
create_doors(self.world, 1)
|
||||||
|
create_rooms(self.world, 1)
|
||||||
create_dungeons(self.world, 1)
|
create_dungeons(self.world, 1)
|
||||||
|
create_owg_connections(self.world, 1)
|
||||||
link_inverted_entrances(self.world, 1)
|
link_inverted_entrances(self.world, 1)
|
||||||
|
link_doors(self.world, 1)
|
||||||
generate_itempool(self.world, 1)
|
generate_itempool(self.world, 1)
|
||||||
self.world.required_medallions[1] = ['Ether', 'Quake']
|
self.world.required_medallions[1] = ['Ether', 'Quake']
|
||||||
self.world.itempool.extend(get_dungeon_item_pool(self.world))
|
self.world.itempool.extend(get_dungeon_item_pool(self.world))
|
||||||
@@ -26,5 +36,5 @@ class TestInvertedOWG(TestBase):
|
|||||||
self.world.get_location('Agahnim 2', 1).item = None
|
self.world.get_location('Agahnim 2', 1).item = None
|
||||||
self.world.precollected_items.clear()
|
self.world.precollected_items.clear()
|
||||||
self.world.itempool.append(ItemFactory('Pegasus Boots', 1))
|
self.world.itempool.append(ItemFactory('Pegasus Boots', 1))
|
||||||
mark_light_world_regions(self.world)
|
mark_light_world_regions(self.world, 1)
|
||||||
set_rules(self.world, 1)
|
set_rules(self.world, 1)
|
||||||
|
|||||||
@@ -128,5 +128,6 @@ class TestDungeons(TestVanillaOWG):
|
|||||||
["Ganons Tower - Hope Room - Left", False, ['Moon Pearl', 'Crystal 1']],
|
["Ganons Tower - Hope Room - Left", False, ['Moon Pearl', 'Crystal 1']],
|
||||||
["Ganons Tower - Hope Room - Left", False, ['Pegasus Boots', 'Crystal 1']],
|
["Ganons Tower - Hope Room - Left", False, ['Pegasus Boots', 'Crystal 1']],
|
||||||
["Ganons Tower - Hope Room - Left", True, ['Moon Pearl', 'Pegasus Boots']],
|
["Ganons Tower - Hope Room - Left", True, ['Moon Pearl', 'Pegasus Boots']],
|
||||||
["Ganons Tower - Hope Room - Left", True, ['Pegasus Boots', 'Hammer', 'Crystal 1', 'Crystal 2', 'Crystal 3', 'Crystal 4', 'Crystal 5', 'Crystal 6', 'Crystal 7']],
|
#todo: more advanced bunny revive logic
|
||||||
|
#["Ganons Tower - Hope Room - Left", True, ['Pegasus Boots', 'Hammer', 'Crystal 1', 'Crystal 2', 'Crystal 3', 'Crystal 4', 'Crystal 5', 'Crystal 6', 'Crystal 7']],
|
||||||
])
|
])
|
||||||
@@ -1,22 +1,33 @@
|
|||||||
from BaseClasses import World
|
from BaseClasses import World
|
||||||
|
from DoorShuffle import link_doors
|
||||||
|
from Doors import create_doors
|
||||||
from Dungeons import create_dungeons, get_dungeon_item_pool
|
from Dungeons import create_dungeons, get_dungeon_item_pool
|
||||||
from EntranceShuffle import link_entrances
|
from EntranceShuffle import link_entrances
|
||||||
from InvertedRegions import mark_dark_world_regions
|
from InvertedRegions import mark_dark_world_regions
|
||||||
from ItemList import difficulties, generate_itempool
|
from ItemList import difficulties, generate_itempool
|
||||||
from Items import ItemFactory
|
from Items import ItemFactory
|
||||||
from Regions import create_regions
|
from OverworldGlitchRules import create_owg_connections
|
||||||
|
from Regions import create_regions, create_dungeon_regions, create_shops
|
||||||
|
from RoomData import create_rooms
|
||||||
from Rules import set_rules
|
from Rules import set_rules
|
||||||
from test.TestBase import TestBase
|
from test.TestBase import TestBase
|
||||||
|
|
||||||
|
|
||||||
class TestVanillaOWG(TestBase):
|
class TestVanillaOWG(TestBase):
|
||||||
def setUp(self):
|
def setUp(self):
|
||||||
self.world = World(1, 'vanilla', 'owglitches', 'open', 'random', 'normal', 'normal', 'none', 'on', 'ganon', 'balanced', True, 'items',
|
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'},
|
||||||
True, False, False, False, False, False, False, None, 'none', False)
|
{1:True}, {1:False}, False, None, {1:False})
|
||||||
self.world.difficulty_requirements = difficulties['normal']
|
self.world.difficulty_requirements[1] = difficulties['normal']
|
||||||
|
self.world.intensity = {1:1}
|
||||||
create_regions(self.world, 1)
|
create_regions(self.world, 1)
|
||||||
|
create_dungeon_regions(self.world, 1)
|
||||||
|
create_shops(self.world, 1)
|
||||||
|
create_doors(self.world, 1)
|
||||||
|
create_rooms(self.world, 1)
|
||||||
create_dungeons(self.world, 1)
|
create_dungeons(self.world, 1)
|
||||||
link_entrances(self.world, 1)
|
link_entrances(self.world, 1)
|
||||||
|
link_doors(self.world, 1)
|
||||||
|
create_owg_connections(self.world, 1)
|
||||||
generate_itempool(self.world, 1)
|
generate_itempool(self.world, 1)
|
||||||
self.world.required_medallions[1] = ['Ether', 'Quake']
|
self.world.required_medallions[1] = ['Ether', 'Quake']
|
||||||
self.world.itempool.extend(get_dungeon_item_pool(self.world))
|
self.world.itempool.extend(get_dungeon_item_pool(self.world))
|
||||||
@@ -25,5 +36,5 @@ class TestVanillaOWG(TestBase):
|
|||||||
self.world.get_location('Agahnim 2', 1).item = None
|
self.world.get_location('Agahnim 2', 1).item = None
|
||||||
self.world.precollected_items.clear()
|
self.world.precollected_items.clear()
|
||||||
self.world.itempool.append(ItemFactory('Pegasus Boots', 1))
|
self.world.itempool.append(ItemFactory('Pegasus Boots', 1))
|
||||||
mark_dark_world_regions(self.world)
|
mark_dark_world_regions(self.world, 1)
|
||||||
set_rules(self.world, 1)
|
set_rules(self.world, 1)
|
||||||
@@ -1,27 +1,36 @@
|
|||||||
from BaseClasses import World
|
from BaseClasses import World
|
||||||
|
from DoorShuffle import link_doors
|
||||||
|
from Doors import create_doors
|
||||||
from Dungeons import create_dungeons, get_dungeon_item_pool
|
from Dungeons import create_dungeons, get_dungeon_item_pool
|
||||||
from EntranceShuffle import link_entrances
|
from EntranceShuffle import link_entrances
|
||||||
from InvertedRegions import mark_dark_world_regions
|
from InvertedRegions import mark_dark_world_regions
|
||||||
from ItemList import difficulties, generate_itempool
|
from ItemList import difficulties, generate_itempool
|
||||||
from Items import ItemFactory
|
from Items import ItemFactory
|
||||||
from Regions import create_regions
|
from Regions import create_regions, create_dungeon_regions, create_shops
|
||||||
|
from RoomData import create_rooms
|
||||||
from Rules import set_rules
|
from Rules import set_rules
|
||||||
from test.TestBase import TestBase
|
from test.TestBase import TestBase
|
||||||
|
|
||||||
|
|
||||||
class TestVanilla(TestBase):
|
class TestVanilla(TestBase):
|
||||||
def setUp(self):
|
def setUp(self):
|
||||||
self.world = World(1, 'vanilla', 'noglitches', 'open', 'random', 'normal', 'normal', 'none', 'on', 'ganon', 'balanced', True, 'items',
|
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'},
|
||||||
True, False, False, False, False, False, False, None, 'none', False)
|
{1:True}, {1:False}, False, None, {1:False})
|
||||||
self.world.difficulty_requirements = difficulties['normal']
|
self.world.difficulty_requirements[1] = difficulties['normal']
|
||||||
|
self.world.intensity = {1:1}
|
||||||
create_regions(self.world, 1)
|
create_regions(self.world, 1)
|
||||||
|
create_dungeon_regions(self.world, 1)
|
||||||
|
create_shops(self.world, 1)
|
||||||
|
create_doors(self.world, 1)
|
||||||
|
create_rooms(self.world, 1)
|
||||||
create_dungeons(self.world, 1)
|
create_dungeons(self.world, 1)
|
||||||
link_entrances(self.world, 1)
|
link_entrances(self.world, 1)
|
||||||
|
link_doors(self.world, 1)
|
||||||
generate_itempool(self.world, 1)
|
generate_itempool(self.world, 1)
|
||||||
self.world.required_medallions[1] = ['Ether', 'Quake']
|
self.world.required_medallions[1] = ['Ether', 'Quake']
|
||||||
self.world.itempool.extend(get_dungeon_item_pool(self.world))
|
self.world.itempool.extend(get_dungeon_item_pool(self.world))
|
||||||
self.world.itempool.extend(ItemFactory(['Green Pendant', 'Red Pendant', 'Blue Pendant', 'Beat Agahnim 1', 'Beat Agahnim 2', 'Crystal 1', 'Crystal 2', 'Crystal 3', 'Crystal 4', 'Crystal 5', 'Crystal 6', 'Crystal 7'], 1))
|
self.world.itempool.extend(ItemFactory(['Green Pendant', 'Red Pendant', 'Blue Pendant', 'Beat Agahnim 1', 'Beat Agahnim 2', 'Crystal 1', 'Crystal 2', 'Crystal 3', 'Crystal 4', 'Crystal 5', 'Crystal 6', 'Crystal 7'], 1))
|
||||||
self.world.get_location('Agahnim 1', 1).item = None
|
self.world.get_location('Agahnim 1', 1).item = None
|
||||||
self.world.get_location('Agahnim 2', 1).item = None
|
self.world.get_location('Agahnim 2', 1).item = None
|
||||||
mark_dark_world_regions(self.world)
|
mark_dark_world_regions(self.world, 1)
|
||||||
set_rules(self.world, 1)
|
set_rules(self.world, 1)
|
||||||
|
|||||||
Reference in New Issue
Block a user