[HK] Further updates for White Palace logic, (#662)
This commit is contained in:
parent
17ba73b0b8
commit
8788ee1aa7
|
@ -165,35 +165,36 @@ class HKWorld(World):
|
||||||
exclusions.update(path_of_pain_locations)
|
exclusions.update(path_of_pain_locations)
|
||||||
if wp <= WhitePalace.option_kingfragment:
|
if wp <= WhitePalace.option_kingfragment:
|
||||||
exclusions.update(white_palace_checks)
|
exclusions.update(white_palace_checks)
|
||||||
if wp == WhitePalace.option_exclude and self.world.RandomizeCharms[self.player]:
|
if wp == WhitePalace.option_exclude:
|
||||||
# Ensure KF location is still reachable if charms are non-randomized
|
exclusions.add("King_Fragment")
|
||||||
|
if self.world.RandomizeCharms[self.player]:
|
||||||
|
# If charms are randomized, this will be junk-filled -- so transitions and events are not progression
|
||||||
exclusions.update(white_palace_transitions)
|
exclusions.update(white_palace_transitions)
|
||||||
exclusions.update(white_palace_events)
|
exclusions.update(white_palace_events)
|
||||||
exclusions.add("King_Fragment")
|
|
||||||
return exclusions
|
return exclusions
|
||||||
|
|
||||||
def create_regions(self):
|
def create_regions(self):
|
||||||
menu_region: Region = create_region(self.world, self.player, 'Menu')
|
menu_region: Region = create_region(self.world, self.player, 'Menu')
|
||||||
self.world.regions.append(menu_region)
|
self.world.regions.append(menu_region)
|
||||||
wp_exclusions = self.white_palace_exclusions()
|
# wp_exclusions = self.white_palace_exclusions()
|
||||||
|
|
||||||
# Link regions
|
# Link regions
|
||||||
for event_name in event_names:
|
for event_name in event_names:
|
||||||
if event_name in wp_exclusions:
|
#if event_name in wp_exclusions:
|
||||||
continue
|
# continue
|
||||||
loc = HKLocation(self.player, event_name, None, menu_region)
|
loc = HKLocation(self.player, event_name, None, menu_region)
|
||||||
loc.place_locked_item(HKItem(event_name,
|
loc.place_locked_item(HKItem(event_name,
|
||||||
event_name not in wp_exclusions,
|
True, #event_name not in wp_exclusions,
|
||||||
None, "Event", self.player))
|
None, "Event", self.player))
|
||||||
menu_region.locations.append(loc)
|
menu_region.locations.append(loc)
|
||||||
for entry_transition, exit_transition in connectors.items():
|
for entry_transition, exit_transition in connectors.items():
|
||||||
if entry_transition in wp_exclusions:
|
#if entry_transition in wp_exclusions:
|
||||||
continue
|
# continue
|
||||||
if exit_transition:
|
if exit_transition:
|
||||||
# if door logic fulfilled -> award vanilla target as event
|
# if door logic fulfilled -> award vanilla target as event
|
||||||
loc = HKLocation(self.player, entry_transition, None, menu_region)
|
loc = HKLocation(self.player, entry_transition, None, menu_region)
|
||||||
loc.place_locked_item(HKItem(exit_transition,
|
loc.place_locked_item(HKItem(exit_transition,
|
||||||
exit_transition not in wp_exclusions,
|
True, #exit_transition not in wp_exclusions,
|
||||||
None, "Event", self.player))
|
None, "Event", self.player))
|
||||||
menu_region.locations.append(loc)
|
menu_region.locations.append(loc)
|
||||||
|
|
||||||
|
@ -208,29 +209,30 @@ class HKWorld(World):
|
||||||
|
|
||||||
wp_exclusions = self.white_palace_exclusions()
|
wp_exclusions = self.white_palace_exclusions()
|
||||||
for option_key, option in hollow_knight_randomize_options.items():
|
for option_key, option in hollow_knight_randomize_options.items():
|
||||||
if getattr(self.world, option_key)[self.player]:
|
randomized = getattr(self.world, option_key)[self.player]
|
||||||
for item_name, location_name in zip(option.items, option.locations):
|
for item_name, location_name in zip(option.items, option.locations):
|
||||||
if location_name in wp_exclusions:
|
vanilla = not randomized
|
||||||
continue
|
excluded = False
|
||||||
if item_name in geo_replace:
|
if item_name in geo_replace:
|
||||||
item_name = "Geo_Rock-Default"
|
item_name = "Geo_Rock-Default"
|
||||||
item = self.create_item(item_name)
|
item = self.create_item(item_name)
|
||||||
# self.create_location(location_name).place_locked_item(item)
|
|
||||||
if location_name == "Start":
|
if location_name == "Start":
|
||||||
self.world.push_precollected(item)
|
self.world.push_precollected(item)
|
||||||
else:
|
|
||||||
self.create_location(location_name)
|
|
||||||
pool.append(item)
|
|
||||||
# elif option_key not in logicless_options:
|
|
||||||
else:
|
|
||||||
for item_name, location_name in zip(option.items, option.locations):
|
|
||||||
if location_name in wp_exclusions and location_name != 'King_Fragment':
|
|
||||||
continue
|
continue
|
||||||
item = self.create_item(item_name)
|
|
||||||
if location_name == "Start":
|
location = self.create_location(location_name)
|
||||||
self.world.push_precollected(item)
|
if not vanilla and location_name in wp_exclusions:
|
||||||
|
if location_name == 'King_Fragment':
|
||||||
|
excluded = True
|
||||||
else:
|
else:
|
||||||
self.create_location(location_name).place_locked_item(item)
|
vanilla = True
|
||||||
|
if excluded:
|
||||||
|
location.progress_type = LocationProgressType.EXCLUDED
|
||||||
|
if vanilla:
|
||||||
|
location.place_locked_item(item)
|
||||||
|
else:
|
||||||
|
pool.append(item)
|
||||||
|
|
||||||
for i in range(self.world.EggShopSlots[self.player].value):
|
for i in range(self.world.EggShopSlots[self.player].value):
|
||||||
self.create_location("Egg_Shop")
|
self.create_location("Egg_Shop")
|
||||||
pool.append(self.create_item("Geo_Rock-Default"))
|
pool.append(self.create_item("Geo_Rock-Default"))
|
||||||
|
|
Loading…
Reference in New Issue