Fix world copy in HMG/NL
This commit is contained in:
6
Main.py
6
Main.py
@@ -27,7 +27,7 @@ from Fill import distribute_items_restrictive, promote_dungeon_items, fill_dunge
|
||||
from Fill import dungeon_tracking
|
||||
from Fill import sell_potions, sell_keys, balance_multiworld_progression, balance_money_progression, lock_shop_locations
|
||||
from ItemList import generate_itempool, difficulties, fill_prizes, customize_shops, fill_specific_items
|
||||
from UnderworldGlitchRules import create_hybridmajor_connections, create_hybridmajor_connectors
|
||||
from UnderworldGlitchRules import create_hybridmajor_connections, create_hybridmajor_connectors, get_hybridmajor_connector_entrances
|
||||
from Utils import output_path, parse_player_names
|
||||
|
||||
from source.item.FillUtil import create_item_pool_config, massage_item_pool, district_item_pool_config, verify_item_pool_config
|
||||
@@ -557,6 +557,8 @@ def copy_world(world):
|
||||
|
||||
# connect copied world
|
||||
copied_locations = {(loc.name, loc.player): loc for loc in ret.get_locations()} # caches all locations
|
||||
hmg_entrances = get_hybridmajor_connector_entrances()
|
||||
|
||||
for region in world.regions:
|
||||
copied_region = ret.get_region(region.name, region.player)
|
||||
copied_region.is_light_world = region.is_light_world
|
||||
@@ -566,6 +568,8 @@ def copy_world(world):
|
||||
for location in copied_region.locations:
|
||||
location.parent_region = copied_region
|
||||
for entrance in region.entrances:
|
||||
if entrance.name in hmg_entrances:
|
||||
continue
|
||||
ret.get_entrance(entrance.name, entrance.player).connect(copied_region)
|
||||
|
||||
# fill locations
|
||||
|
||||
@@ -6,12 +6,11 @@ kikiskip_spots = [
|
||||
("Kiki Skip", "Spectacle Rock Cave (Bottom)", "Palace of Darkness Portal")
|
||||
]
|
||||
|
||||
mireheraswamp_spots = [
|
||||
("Mire to Hera Clip", "Mire Torches Top", "Hera Portal"),
|
||||
("Hera to Swamp Clip", "Mire Torches Top", "Swamp Portal"),
|
||||
]
|
||||
mirehera_spots = [("Mire to Hera Clip", "Mire Torches Top", "Hera Portal")]
|
||||
|
||||
icepalace_spots = [("Ice Lobby Clip", "Ice Portal", "Ice Bomb Drop")]
|
||||
heraswamp_spots = [("Hera to Swamp Clip", "Mire Torches Top", "Swamp Portal")]
|
||||
|
||||
icepalace_spots = [("Ice Lobby Clip", "Ice Portal", "Ice Bomb Drop - Top")]
|
||||
|
||||
thievesdesert_spots = [
|
||||
("Thieves to Desert West Clip", "Thieves Attic", "Desert West Portal"),
|
||||
@@ -32,14 +31,12 @@ paradox_spots = [
|
||||
kikiskip_connectors = [
|
||||
("Kiki Skip Connector", "Spectacle Rock Cave (Bottom)", "Palace of Darkness Exit")
|
||||
]
|
||||
|
||||
|
||||
mireheraswamp_connectors = [
|
||||
("Mire to Hera Connector", "Mire Torches Top", "Tower of Hera Exit"),
|
||||
("Mire to Swamp Connector", "Mire Torches Top", "Swamp Palace Exit"),
|
||||
mirehera_connectors = [
|
||||
("Mire to Hera Connector", "Mire Torches Top", "Tower of Hera Exit")
|
||||
]
|
||||
heraswamp_connectors = [
|
||||
("Mire to Swamp Connector", "Mire Torches Top", "Swamp Palace Exit")
|
||||
]
|
||||
|
||||
|
||||
thievesdesert_connectors = [
|
||||
("Thieves to Desert West Connector", "Thieves Attic", "Desert Palace Exit (West)"),
|
||||
(
|
||||
@@ -49,7 +46,6 @@ thievesdesert_connectors = [
|
||||
),
|
||||
("Thieves to Desert East Connector", "Thieves Attic", "Desert Palace Exit (East)"),
|
||||
]
|
||||
|
||||
specrock_connectors = [
|
||||
(
|
||||
"Spec Rock Top Connector",
|
||||
@@ -68,7 +64,8 @@ specrock_connectors = [
|
||||
def create_hybridmajor_connections(world, player):
|
||||
for spots in [
|
||||
kikiskip_spots,
|
||||
mireheraswamp_spots,
|
||||
mirehera_spots,
|
||||
heraswamp_spots,
|
||||
icepalace_spots,
|
||||
thievesdesert_spots,
|
||||
specrock_spots,
|
||||
@@ -81,7 +78,8 @@ def create_hybridmajor_connections(world, player):
|
||||
def create_hybridmajor_connectors(world, player):
|
||||
for connectors in [
|
||||
kikiskip_connectors,
|
||||
mireheraswamp_connectors,
|
||||
mirehera_connectors,
|
||||
heraswamp_connectors,
|
||||
thievesdesert_connectors,
|
||||
specrock_connectors,
|
||||
]:
|
||||
@@ -96,6 +94,19 @@ def create_hybridmajor_connectors(world, player):
|
||||
create_no_logic_connections(player, world, new_connectors)
|
||||
|
||||
|
||||
def get_hybridmajor_connector_entrances():
|
||||
connectors = []
|
||||
for connector in (
|
||||
kikiskip_connectors
|
||||
+ mirehera_connectors
|
||||
+ heraswamp_connectors
|
||||
+ thievesdesert_connectors
|
||||
+ specrock_connectors
|
||||
):
|
||||
connectors.append(connector[0])
|
||||
return set(connectors)
|
||||
|
||||
|
||||
# For some entrances, we need to fake having pearl, because we're in fake DW/LW.
|
||||
# This creates a copy of the input state that has Moon Pearl.
|
||||
def fake_pearl_state(state, player):
|
||||
|
||||
Reference in New Issue
Block a user