Merging Regions and Rulesets

This commit is contained in:
codemann8
2022-12-13 01:40:44 -06:00
parent 5ac01f4f35
commit 8e08f336d0
15 changed files with 720 additions and 1222 deletions

View File

@@ -3,10 +3,9 @@ from DoorShuffle import link_doors
from Doors import create_doors
from Dungeons import create_dungeons, get_dungeon_item_pool
from EntranceShuffle import link_entrances
from InvertedRegions import create_inverted_regions
from ItemList import generate_itempool, difficulties
from Items import ItemFactory
from Regions import mark_light_world_regions, create_dungeon_regions, create_shops
from Regions import create_regions, mark_light_dark_world_regions, create_dungeon_regions, create_shops
from RoomData import create_rooms
from Rules import set_rules
from test.TestBase import TestBase
@@ -18,7 +17,7 @@ class TestInverted(TestBase):
{1: True}, {1: False}, False, None, {1: False})
self.world.difficulty_requirements[1] = difficulties['normal']
self.world.intensity = {1: 1}
create_inverted_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)
@@ -32,5 +31,5 @@ class TestInverted(TestBase):
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 2', 1).item = None
mark_light_world_regions(self.world, 1)
mark_light_dark_world_regions(self.world, 1)
set_rules(self.world, 1)

View File

@@ -4,7 +4,7 @@ from BaseClasses import World
from Dungeons import create_dungeons
from EntranceShuffle import connect_entrance, Inverted_LW_Entrances, Inverted_LW_Dungeon_Entrances, Inverted_LW_Single_Cave_Doors, Inverted_Old_Man_Entrances, Inverted_DW_Entrances, Inverted_DW_Dungeon_Entrances, Inverted_DW_Single_Cave_Doors, \
Inverted_LW_Entrances_Must_Exit, Inverted_LW_Dungeon_Entrances_Must_Exit, Inverted_Bomb_Shop_Multi_Cave_Doors, Inverted_Bomb_Shop_Single_Cave_Doors, Inverted_Blacksmith_Single_Cave_Doors, Inverted_Blacksmith_Multi_Cave_Doors
from InvertedRegions import create_inverted_regions
from Regions import create_regions
from ItemList import difficulties
from Rules import set_inverted_big_bomb_rules
from test.inverted.TestInverted import TestInverted

View File

@@ -3,11 +3,10 @@ from DoorShuffle import link_doors
from Doors import create_doors
from Dungeons import create_dungeons, get_dungeon_item_pool
from EntranceShuffle import link_entrances
from InvertedRegions import create_inverted_regions
from ItemList import generate_itempool, difficulties
from Items import ItemFactory
from OverworldGlitchRules import create_owg_connections
from Regions import mark_light_world_regions, create_dungeon_regions, create_shops
from Regions import create_regions, mark_light_dark_world_regions, create_dungeon_regions, create_shops
from RoomData import create_rooms
from Rules import set_rules
from test.TestBase import TestBase
@@ -19,7 +18,7 @@ class TestInvertedOWG(TestBase):
{1: True}, {1: False}, False, None, {1: False})
self.world.difficulty_requirements[1] = difficulties['normal']
self.world.intensity = {1: 1}
create_inverted_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)
@@ -36,5 +35,5 @@ class TestInvertedOWG(TestBase):
self.world.get_location('Agahnim 2', 1).item = None
self.world.precollected_items.clear()
self.world.itempool.append(ItemFactory('Pegasus Boots', 1))
mark_light_world_regions(self.world, 1)
mark_light_dark_world_regions(self.world, 1)
set_rules(self.world, 1)

View File

@@ -3,11 +3,10 @@ from DoorShuffle import link_doors
from Doors import create_doors
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, generate_itempool
from Items import ItemFactory
from OverworldGlitchRules import create_owg_connections
from Regions import create_regions, create_dungeon_regions, create_shops
from Regions import create_regions, create_dungeon_regions, create_shops, mark_light_dark_world_regions
from RoomData import create_rooms
from Rules import set_rules
from test.TestBase import TestBase
@@ -36,5 +35,5 @@ class TestVanillaOWG(TestBase):
self.world.get_location('Agahnim 2', 1).item = None
self.world.precollected_items.clear()
self.world.itempool.append(ItemFactory('Pegasus Boots', 1))
mark_dark_world_regions(self.world, 1)
mark_light_dark_world_regions(self.world, 1)
set_rules(self.world, 1)

View File

@@ -8,7 +8,6 @@ from source.overworld.EntranceShuffle2 import link_entrances_new
from EntranceShuffle import link_entrances
from BaseClasses import World
from Regions import create_regions, create_dungeon_regions
from InvertedRegions import create_inverted_regions
# tested: open + crossed (lh) Mar. 17 (made changes)
@@ -103,10 +102,8 @@ def test_loop(tests, entrance_set, exit_set, ctr, shuffle_mode, main_mode, links
{}, {}, {}, {}, {}, True, {}, {}, [], {})
world.customizer = False
world.shufflelinks = {1: links}
if world.mode[1] != 'inverted':
create_regions(world, 1)
else:
create_inverted_regions(world, 1)
world.shuffletavern = {1: False}
create_regions(world, 1)
create_dungeon_regions(world, 1)
# print(f'Linking seed {seed}')
# try:

View File

@@ -3,10 +3,9 @@ from DoorShuffle import link_doors
from Doors import create_doors
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, generate_itempool
from Items import ItemFactory
from Regions import create_regions, create_dungeon_regions, create_shops
from Regions import create_regions, create_dungeon_regions, create_shops, mark_light_dark_world_regions
from RoomData import create_rooms
from Rules import set_rules
from test.TestBase import TestBase
@@ -32,5 +31,5 @@ class TestVanilla(TestBase):
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 2', 1).item = None
mark_dark_world_regions(self.world, 1)
mark_light_dark_world_regions(self.world, 1)
set_rules(self.world, 1)