Skip to content

fix: static key logic left Turtle Rock unrelaxed in standard mode - #8

Merged
CVW-HMB merged 1 commit into
DoorDevUnstablefrom
fix/static-standard-turtle-rock
Sep 15, 2026
Merged

CVW-HMB merged 1 commit into
DoorDevUnstablefrom
fix/static-standard-turtle-rock

Conversation

@CVW-HMB

@CVW-HMB CVW-HMB commented Sep 15, 2026

Copy link
Copy Markdown
Owner

Why

Standard mode could not generate a seed with in-dungeon keys under --key_logic_algorithm static:
0 of 20 seeds succeeded, every one failing with No more spots to place Small Key (Turtle Rock).

set_turtle_rock_rules probes which Turtle Rock entrance is reachable in order to decide how far
TR's key doors can be relaxed. It built that probe state with get_all_state(keys=False), which
excludes every dungeon key — including Small Key (Escape). In standard mode the sewers cannot be
left without that key, so all four probes returned False, the if/elif chain fell through with no
branch taken, and Turtle Rock kept the raw DOOR_RULES numbers. Those numbers assume a relaxation
that never happened: TR Hub NW demands 4 chest keys and the dungeon holds exactly 4, so the first
door needs all of them and the fill has nowhere to put the last key.

What

  • get_all_state(keys=False)get_all_state(keys=True) in set_turtle_rock_rules. The very
    next line already zeroes this dungeon's own keys, which is what the existing comment describes
    and what keeps TR's key doors shut. Other dungeons' keys were never meant to be excluded.
  • Extend the comment to record why the other dungeons' keys have to be present.

Acceptance

standard  0/20 -> 20/20 seeds
open     20/20 -> 20/20 seeds, branch selection unchanged (front)
test/    215 failed / 84 passed / 2621 subtests, identical before and after
         (the failures are pre-existing owg and inverted_owg)

Open seeds shift because the sweep order changes, but only junk items move — no progression
placement changed across the five seeds compared.

Not in this PR

No change to door rando's own key logic, to DOOR_RULES, or to the other three dungeons with
entrance-dependent relaxation. Only the probe state is corrected.

🤖 Generated with Claude Code

set_turtle_rock_rules probes which Turtle Rock entrance is reachable to
decide how far its key doors can be relaxed. It built that state with
get_all_state(keys=False), which excludes every dungeon key -- including
Small Key (Escape). In standard mode the sewers cannot be left without
that key, so all four probes returned False, the if/elif chain fell
through with no branch taken, and Turtle Rock kept the raw DOOR_RULES
numbers. Those assume a relaxation that never happened: TR Hub NW demands
4 chest keys and the dungeon holds exactly 4, so the first door needs all
of them and the fill has nowhere to put the last key.

Standard mode could not generate a seed with in-dungeon keys under
--key_logic_algorithm static: 0 of 20 seeds succeeded, every one failing
with "No more spots to place Small Key (Turtle Rock)".

Use keys=True. The next line already zeroes this dungeon's own keys,
which is what the comment describes and what keeps its key doors shut.

  standard  0/20 -> 20/20 seeds
  open     20/20 -> 20/20 seeds, branch selection unchanged (front)
  test/    215 failed / 84 passed / 2621 subtests, identical before and
           after; the failures are pre-existing owg and inverted_owg

Open seeds shift because the sweep order changes, but only junk items
move -- no progression placement changed in the five seeds compared.

Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
@CVW-HMB
CVW-HMB merged commit 9a3d4f6 into DoorDevUnstable Sep 15, 2026
14 of 20 checks passed
@CVW-HMB
CVW-HMB deleted the fix/static-standard-turtle-rock branch September 15, 2026 08:10
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant