Revamped dungeon generation

Revamped key logic generation
Prevent key floods in playthrough/can_beat_game checks
This commit is contained in:
aerinon
2019-10-31 11:09:58 -06:00
parent bc30cc3b42
commit 90c3368f9d
8 changed files with 1029 additions and 311 deletions

View File

@@ -282,6 +282,7 @@ def copy_world(world):
ret.rooms = world.rooms
ret.inaccessible_regions = world.inaccessible_regions
ret.dungeon_layouts = world.dungeon_layouts
ret.key_logic = world.key_logic
for player in range(1, world.players + 1):
set_rules(ret, player)
@@ -337,7 +338,7 @@ def create_playthrough(world):
sphere = []
# build up spheres of collection radius. Everything in each sphere is independent from each other in dependencies and only depends on lower spheres
for location in sphere_candidates:
if state.can_reach(location):
if state.can_reach(location) and state.not_flooding_a_key(world, location):
sphere.append(location)
for location in sphere: